Weapon creation guides? Created 9 years ago2015-08-20 14:01:30 UTC by Kazemeka Kazemeka

Created 9 years ago2015-08-20 14:01:30 UTC by Kazemeka Kazemeka

Posted 9 years ago2015-08-20 14:01:30 UTC Post #326780
Are there any good guides that shows how to create weapons? Like normal guides, not websites made out of C++ copypaste? And I do not accept copypaste as my weapons must work in a specific way that I will code later.
Posted 9 years ago2015-08-21 00:55:55 UTC Post #326784
I know how you feel. I've searched for any general information guides on HL programming, but the only things I can find are useless copy/paste "tutorials". If anybody knows any HL programming guides, I'd love to know about them! There's nothing I can find even on the basic stuff, like client/server messaging, adding new entities, locating objects, AI scheduling, or any general architecture information.

It's all really specific stuff like: "make your gun glow in the dark: just paste this code in this file!". It's annoying how inefficient this stuff is - instead of someone writing some useful documentation, everyone's trying separately to read Valve's terrible code and trying to figure out how it works.

I haven't done a lot of HL programming, but for adding new weapons, the only thing I can suggest is: copy the weapon that's "closest" to the one you want to make, and then start modifying the code from there. But that's not very useful advice :)
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-08-21 10:23:51 UTC Post #326786
Well then Ill have to contact some of the devs behind weapon mods.

And I cant do copypaste the closest weapon, because the weapon is a pile of books :)

So yeah, I need to learn how to code the weapon from sratch..
Posted 9 years ago2015-08-21 11:04:15 UTC Post #326787
Please document anything you learn :) When I have time I would like to add a basic Goldsource coding guideline to TWHL's wiki, any info is useful!
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-08-21 12:10:48 UTC Post #326788
Yes, I will ask the devs if I could use their knowledge to publish a guide on weapon building...

Off to filter the 10k mods out there!

EDIT: On the note of mods that contain custom weapons, there are not that many. Even then they are mostly re-skins. I found a few mods that contain custom weapons, that obviously needed coding, but I got around sending only two PMs on moddb because there is practically no way of contacting the authors (Either gone or dont have contact details or speak russian which I do not understand).
Posted 9 years ago2015-08-21 15:22:29 UTC Post #326789
I've seen one decent tutorial on HL weapon coding somewhere deep in webarchive, tho you gotta find it yourself!:p
Posted 9 years ago2015-08-21 15:44:39 UTC Post #326790
Bruce, what webarchive? Theres tons of them! A name would help.
Posted 9 years ago2015-08-23 02:01:54 UTC Post #326803
Posted 9 years ago2015-08-23 04:56:00 UTC Post #326808
that's a pretty epic source, Bruce, thanks!
Tetsu0 Tetsu0Positive Chaos
Posted 9 years ago2015-08-23 08:26:03 UTC Post #326811
Thanks bruce! You saved us some time!

Now off to read and work on animated keycards!
Posted 9 years ago2015-08-23 13:41:53 UTC Post #326814
welcome
Posted 9 years ago2015-08-23 21:46:58 UTC Post #326816
Scientist Hunt had a few cool custom weapons.
Posted 9 years ago2015-08-24 05:23:37 UTC Post #326817
Yeah, but they are based on weapons that are already in game, except their values have changed..
Posted 9 years ago2015-08-24 11:45:31 UTC Post #326818
What weapons do you want to add?
There's a few different base types that you can expand upon.

There's projectile weapons: grenades and crossbow
There's linetrace weapons (no travel time): pistols, rifles
Multi-shot linetrace weapons: shotguns

Surely your new weapon type would use something along those lines?
Tetsu0 Tetsu0Positive Chaos
Posted 9 years ago2015-08-24 11:47:58 UTC Post #326819
And I cant do copypaste the closest weapon, because the weapon is a pile of books :)
Jessie JessieTrans Rights <3
Posted 9 years ago2015-08-24 16:52:34 UTC Post #326820
Wouldn't all that's necessary to be to copy-paste the code of another weapon, setting the model to use to the book viewmodel and straight out deleting all the attack and reload functions? I mean, it sounds so simple it must be doable.
Dr. Orange Dr. OrangeSource good.
Posted 9 years ago2015-08-24 20:52:27 UTC Post #326821
yeah it should be but the weapon code is fucking EVERYWHERE
Not to mention you need ammo types and then the skill.cfg file
Tetsu0 Tetsu0Positive Chaos
Posted 9 years ago2015-08-24 23:13:08 UTC Post #326822
Posted 9 years ago2015-08-28 09:40:05 UTC Post #326857
Ok so I got it! I think I got it...

Nope, still crashes on start.

Basically im just doing some special "weapons". No copypaste needed, because you wont kill with it.

I think that at the end of autumn Ill do a demo video.
You must be logged in to post a response.