Creating a Custom NPC Created 14 years ago2009-12-26 08:12:18 UTC by claytonbarton claytonbarton

Created 14 years ago2009-12-26 08:12:18 UTC by claytonbarton claytonbarton

Posted 14 years ago2009-12-26 08:13:32 UTC Post #276925
Hello everyone.
Now I know that questions surrounding the subject of creating an entirely new NPC have been raised countless times before. I've searched along with many others, through threads on any HL2 editing site to be found. And yet there seems to be no walk through guide to help any of us out who are new to programming and modding.

So what I'm asking is, does anyone know of any guide out there that walks you through the process of creating a new NPC for a HL2 Mod? I've checked out the NPC tutorials on the Valve Developer Community (http://developer.valvesoftware.com/wiki/Creating_an_NPC) but the directions there seem vague and difficult to understand for someone who has only just started out with programming.

If a guide detailing the steps to create an NPC from the ground up does not yet exist, would it be possible for someone who has experience with such a topic to kindly take the time to write up such an article. It doesn't have to be complicated, maybe something as simple as getting a character to walk around in game.

I know this is a big ask, but I can safely say that not only would a tutorial covering the creation of an NPC benefit myself, but it would greatly benefit the rest of the modding community. Surely someone out there would be kind enough to share their knowledge on the subject.

Regaurds
-Clayton.
Posted 14 years ago2009-12-27 01:26:30 UTC Post #276949
Come on guys, there must be someone out there who can offer some knowledge on the subject. Imagine how many fellow modders are out there stuck in this situation and asking this exact same question. I know basic programming, and the difference between a class, variable, and function, but the thing is when it comes to coding within a game engine every one is different. Programming a new NPC for HL2 would be different to coding a new NPC into UT3, and vice versa.

I would even go so far as to say I'd be willing to purchase a guide to creating a new NPC for HL2 like the guys at Noesis Interactive did for Mapping and Modeling. Not the modeling, just getting the code for a new character up and running using a model such as the City 17 Citizen as a placeholder. It would go such a long way in helping out the community, and I'm sure it would mean a lot not just to me, but everyone else who needs a helping hand in incorporating their new characters into Half-Life 2.
Posted 14 years ago2009-12-27 10:47:58 UTC Post #276964
Try basing it off the closest NPC type you can find already coded.
Then just remove parts you don't want, add parts from other NPCs, ect.
I can't really tell you what to do in the way of actual code, though, because I have no experience either.
just getting the code for a new character up and running using a model such as the City 17 Citizen as a placeholder
If it's a companion character, use Alyx as a base. If it's more of a combat character, use barney. If it's a dialouge character, use Kleiner, Eli, Mossman or Breen. If it's an NPC instead of a main/minor character, use whatever is closest in behaviour and force.

That's all I can really contriubute. Sorry.

EDIT: It may also be worth noting that Cubbage from the NLO base was just a citizen with a unique model, type set to unique, and a different voice set than the others.
Notewell NotewellGIASFELFEBREHBER
You must be logged in to post a response.