Fishing in HL2! Created 4 days ago2024-12-19 00:19:34 UTC by donnalee2007 donnalee2007

Created 4 days ago2024-12-19 00:19:34 UTC by donnalee2007 donnalee2007

Posted 4 days ago2024-12-19 00:19:34 UTC Post #349417
Hi TWHL,

I'll keep this pretty brief and straightforward. I'm interested in using source and/or goldsrc for a school art project, as I've long been a fan of the games and I vaguely know how to make a map. I have a pretty niche request though; would anyone know where to start with having a custom npc who simply sits on a bench and fishes? If you look through my vault you'll find the map I want to put him on, and you should be able to get an idea of what I'm looking for. I'm down to learn how to make custom animations, models, and other such things (in fact, due to it being for a class, I should steer clear of prefabs etc.) but I'll need to be pointed in the right direction.

Any help or guidance would be greatly appreciated.

Thanks,
Donnalee
Posted 3 days ago2024-12-19 10:21:18 UTC Post #349418
I'm going to focus on GoldSrc as that's where I'm far more experienced at.
Let's break it down into two parts: The entity part and the model part.

For the entity part, you have to decide on whether you truly need a custom NPC. If all you need is to display a model playing an idle animation and perhaps play some other animations now and then, and no need for an actual AI, then you could do that with a monster_generic and use scripted_sequence to play different animations.
If you do need some AI, then you'll need to do some code changes. Easiest would be making a duplicate of an existing NPC and adjust it to your needs. A good place to start for that would be Half-Life Programming - Getting Started.

For the model part, I highly recommend Blender as the editor (it's free and powerful, and with Blender Source Tools you can export to both GoldSrc and Source).
Regardless of editor, you should take some time to learn how to use that editor, specifically learn how to create meshes, apply materials, and creating, skinning a mesh to, posing and animating skeletal armatures.
After that, familiarise yourself with the process exporting and compiling a model, The303 has a great guide about that here, by making a simple model (e.g. just a static crate) and then once you've done that successfully try out exporting and compiling an animated model.
Once you have a grip on the export and compile process, you can decide on whether to create your custom model from scratch or start by editing an existing model. I'd recommend the latter, as it's far easier and quicker, and if it's a NPC model then you get a skeletal armature and animations for free.
To edit an existing model, you can use Crowbar as the decompiler, and then import the decompiled files into your editor (if using Blender with BST, you can simply choose to import the QC file by itself and it'll import everything else automatically). Make your changes to the mesh, apply or change textures, and skin the new mesh to the armature. Modify animations or create new ones. It should then be ready to be exported and compiled.

Some of these things will be similar in Source, but you'll find a lot better information and guides than what I can provide about this over at the VDC. 🙂
You must be logged in to post a response.