Garry's Mod

Garry's Mod

JMod: Half-Life 2
 此主题已被置顶,因此可能具有重要性
Rikou 2023 年 10 月 17 日 下午 7:12
How to add JMod HL2 items to crafting (the lazy way)
So, I decided to make a crafting config for this mod a couple days ago, and decided I should release it to the public, with a lil guide on how to implement it :3

WARNING: This contains JSON, a very stubborn programming language.

1 | Get everything you'll need
First, you'll need the crafting config: https://pastebin.com/NyMH1CDk
You can edit as you please, I just put the crafting ingredients I thought were reasonable. Editing may be difficult, since it is in JSON format. Use a parser or linter if you need to.

You'll also need to navigate to your JMod config file. It should be located at:steamapps/common/GarrysMod/garrysmod/data/jmod_config.txt

Keep in mind, You will not need to restart Garry's mod, or even reload, to implement these changes. This is best done while you're still in a game.

2 | Do the meticulous stuff
This is where the JSON begins. If you mess anything up, the crafting recipes may not work.

You'll first copy the config values off of the Pastebin, and be sure you've copied them completely. Then, in your config file, look for the commaless bracket that ends off the Craftables. It should be here (should be on line 1770 of the config, if you're using a code-oriented text editor):

"description": "Will provide light damage protection at little cost to mobility." } }, "General": {

You're gonna wanna do a bit of a weird maneuver; Add a comma to this bracket, hit enter, and then paste on the new line from the pastebin. The pastebin has a bracket that will automatically close the value "Craftables".

Don't forget to save the file! this can be done quickly with Ctrl+S.

3 | Finalize your changes
Once your config file is saved, along with all the changes you've made, execute jmod_reloadconfig in the developer console. Then, check both of the crafting menus affected; Workbench and Toolbox.

If they're not there, you can execute console command jmod_resetconfig and try again, or use JSONLint[jsonlint.com] to troubleshoot.

If they are there, happy crafting~! :luv:
最后由 Rikou 编辑于; 2023 年 12 月 20 日 下午 9:29
< >
正在显示第 1 - 11 条,共 11 条留言
arsonist 2023 年 10 月 30 日 下午 12:56 
yo tysm
144hz_pistolmaniac 2023 年 10 月 31 日 下午 2:41 
Thanks for the guide, helped me understand on why my seemingly fine custom crafting recipes didn't work properly.
AdventureBoots  [开发者] 2023 年 11 月 10 日 下午 7:54 
Nice to see someone do this, not quite how I'd price everything, but it's good non-the-less
TankDestroyer 2024 年 1 月 28 日 下午 7:05 
please can you make ready config for download?
or video guide?
GameWorldReality 2024 年 5 月 15 日 下午 10:43 
i dont know anything about coding so i cant really use this.. here's to pray JMOD:HL2 will get an update that adds them to vanilla jmod crafting :pray:
Пулемётчики 2024 年 12 月 9 日 下午 11:30 
I pasted the config as I should, reloaded the jmod config in the console, but still I can't find most of your addon stuff, what can I do about it?
AdventureBoots  [开发者] 1 月 7 日 下午 11:09 
There is now a concommand for merging pre-made recipes using lua.
`jmod_hl2_merge_recipes`
Here is the best, I used it and thought it didn't work and then I decided to reload the krafts config, and oh wonder! All the crafts from the mod showed up! Thanks again
For me the merging command didn't work so I used this, but I've noticed that a couple of items aren't producing the correct items, these consist of the stun baton, crowbar, and combine turret. In the pastebin, you can see that the stun baton and combine turret when made results a different item (the stun baton becomes the smg2 and the combine turret turns into the combine suit), these can be easy fixes as you just need to replace the result with the item necessary but the crowbar appears to be perfectly fine in the pastebin but in game its bugged for me.
I found the solution, you want to replace each result item with ent_aboot_gmod_ezstunstick,
ent_aboot_gmod_ezcrowbar, and ent_aboot_gmod_ezcombinesentry.
pleb 8 月 22 日 上午 8:15 
It also crafts the 9mm handgun rather than the alyx gun
< >
正在显示第 1 - 11 条,共 11 条留言
每页显示数: 1530 50