Hello! I am a long time Garry's Mod player and I would love to start scripting for it, however I have run into some problems.
I have no idea where to start, if someone could point me in the right direction that would be great.
If it means anything, I would rate myself as a beginner with Lua and scripting in general, but I am willing and hoping to learn.
Code_gs made a nice thread for people like you; [url]http://fcpn.ch/c5Nlh[/url]
Should give you some sort of sense about where to start.
Thank you! I'll look into this
[QUOTE=Jouaram;45639521]Thank you! I'll look into this[/QUOTE]
No problem.
Not sure if you want any more responses, but for future references, click the "Mark as Solved" on top of your thread if you wish to lock / close the thread.
Hey, welcome to FacePunch. Here is a wall-of-data ( including the code_gs thread ).. Basically some helpful-threads and old resources, Notepad++ mods to include GLua Syntax Highlighting, updated context menu / menu options to provide a search to the new and old GMod wiki, DarkRP Wiki, and more... and also another option ( developer-skeleton base game-mode ) which auto-loads files for you if you want that.
I tutor many people, if you're interested in learning, feel free to add me on Steam.
[B]Wall of data:[/B]
This forum is for devs that need help working on things. Here are some resources to help you get started:
----------------------------------------------
General Learning Lua Help Thread ( Contains links to helpful topics, and websites ): [url]http://facepunch.com/showthread.php?t=1337945[/url]
Problems that don't need their own thread ( All simple questions / quickies should go here, but please do not post a question here AND make a new topic.. ): [url]http://facepunch.com/showthread.php?t=1411111[/url]
OLD Problems and Solutions thread ( contains a massive amount of useful data ): [url]http://facepunch.com/showthread.php?t=1348923[/url]
Garry's Mod Wiki: [url]http://wiki.garrysmod.com/page/Main_Page[/url]
Old Garry's Mod Wiki ( Contains a lot of useful information; some content may not work without modification within GM13 ): [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4875.html[/url]
DarkRP Help Thread ( [b]ALL[/b] DarkRP Questions go here ): [url]http://facepunch.com/showthread.php?t=1249475[/url]
DarkRP Wiki ( Most questions can be answered here ): [url]http://wiki.darkrp.com/index.php/Main_Page[/url]
Creating Jobs in DarkRP: [url]http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields[/url]
Creating Shipments in DarkRP: [url]http://wiki.darkrp.com/index.php/DarkRP:CustomShipmentFields[/url]
Looking to [b]HIRE[/b] a coder? Read this: [url]http://facepunch.com/showthread.php?t=1257110[/url] and visit [url]http://www.coderhire.com[/url]
Coderhire Thread: [url]http://facepunch.com/showthread.php?t=1281665[/url]
Facepunch Style Fixer for GreaseMonkey: [url]https://userstyles.org/styles/65192/facepunch-fixer[/url]
Or the updated Faceraper: [url]http://www.facepunch.com/showthread.php?t=1314761[/url]
----------------------------------------------
[B]Notepad++ Mods[/B]
This is my game-mode and how files are loaded: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_file_structure/files_order.txt[/url]
If you get into coding in GLua, I'd recommend grabbing the GLua plugin with updated XML... Here are some resources for upgrading Notepad++ with some interesting functionality:
How to install the Syntax Highlighting XML:
[url]https://dl.dropboxusercontent.com/u/26074909/_dev_tools/notepadpp_highlighting/installing_gmod_lua_text_highlighting.lua.html[/url]
Garry's Mod Notepad++ Lua Syntax Highlighting:
[url]https://dl.dropboxusercontent.com/u/26074909/_dev_tools/notepadpp_highlighting/GmodLua.xml[/url]
If you want other nice features, replace these in the %appdata%\notepad++ config or plugin dir:
This adds DarkRP wiki search, Old and new Garry's Mod Wiki search, and a macro called Trim trailing and save ( removes blank space at end of line and saves file; super useful )
[url]https://dl.dropboxusercontent.com/u/26074909/_dev_tools/shortcuts.xml[/url]
This edits to add default Lua syntax highlighting built-in
[url]https://dl.dropboxusercontent.com/u/26074909/_dev_tools/functionList.xml[/url]
This changes the right-click menu to be useful ( for my purpose, but it is easy to change )..
[url]https://dl.dropboxusercontent.com/u/26074909/_dev_tools/contextMenu.xml[/url]
> denotes sub-menu / menu open with tab-indent to show contents and de-dent to go back to parent
[code]Right click >
Save [ Trim Trailing ]
Export to HTML
--------------------
Reload File
Open Current Files' Folder
--------------------
Garry's Mod Wiki Search
Garry's Mod Old Wiki Search
Garry's Mod DarkRP Wiki Search
Search Google
--------------------
Edit >
Cut
Copy
Paste
Delete
--------------------
Select ALL
--------------------
UPPERCASE
lowercase
--------------------
Hide Lines
--------------------
Text Highlighting >
Clear All Styles
--------------------
Using 1st Style
Using 2nd Style
Using 3rd Style
Using 4th Style
Using 5th Style
--------------------
Clear 1st Style
Clear 2nd Style
Clear 3rd Style
Clear 4th Style
Clear 5th Style
--------------------
Plugin Commands >
Open Color Picker
--------------------
Base64 Encode
Base64 Decode
--------------------
ASCII -> HEX
HEX -> ASCII
--------------------
Open Plugin Manager
--------------------
[/code]
[B]Skeleton Game-Mode info[/B]
If you want something to make development easier feel free to contact me regarding my auto-loader developer-skeleton game-mode...
Folder structure: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_redistributable/acecooldev_base/documentation/folder_structure_and_how_to_use_it.txt[/url]
File loading options: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_redistributable/acecooldev_base/documentation/file_recursive_inclusions.txt[/url]
Take note as to what was said above and look at files changing the realm they're loaded in on the fly in a shared/ folder.
[code][32] = [SHARED] :: gamemode/shared/classes/elevator/_sh_elevator.lua
[33] = [CLIENT] :: gamemode/shared/classes/elevator/cl_elevator.lua
[34] = [SERVER] :: gamemode/shared/classes/elevator/sv_elevator.lua
[35] = [SHARED] :: gamemode/shared/classes/jobs/_class_jobs.lua
[36] = [SERVER] :: gamemode/shared/classes/jobs/_sv_class_jobs.lua
[37] = [SHARED] :: gamemode/shared/classes/networking/_sh_networking.lua
[38] = [CLIENT] :: gamemode/shared/classes/networking/cl_networking.lua
[39] = [SERVER] :: gamemode/shared/classes/networking/sv_networking.lua
[40] = [SHARED] :: gamemode/shared/classes/npc/_sh_npc.lua
[41] = [CLIENT] :: gamemode/shared/classes/npc/cl_npc.lua
[42] = [SERVER] :: gamemode/shared/classes/npc/sv_npc.lua
[43] = [SHARED] :: gamemode/shared/classes/class_bullets.lua
[44] = [SHARED] :: gamemode/shared/classes/class_card.lua
[45] = [SHARED] :: gamemode/shared/classes/class_cards.lua[/code]
It just makes it easier to group like files together and load it into a specific realm.
Unlimited folder nesting is supported.. It is as easy and dragging and dropping files into folders.
Also, you can disable auto-refresh with the autoloader; just type loadgm to refresh the game-mode. If you add a new file, type loadgm and save the new file once to have it detected ( with autorefresh on ). It works in Linux too, without autorefresh! I'll be adding a lot of things to the bitbucket such as helper-functions, wrappers, metatable objects / "classes", etc... Basically, it makes it easy to make a new game-mode by providing a lot of the building blocks, or with the simple system ( just using the auto-loader ) to make file-loading easy without having to mess with AddCSLuaFile or include functions.
Sorry, you need to Log In to post a reply to this thread.