Please or Register to create posts and topics.

Creating a new NPC and Level Design By A Newb

Page 1 of 4Next

I've been scouring the web for information on how to do this, and the most useful information I've found has been here. Here's what I have in mind, based on the information I've found in multiple threads on this forum. WARNING: What you are about to read is REALLY INSANELY AMBITIOUS and probably looks far better in my head than it will in the "finished" product. Unfortunately, I can only think of one way to reliably get what's in my head out into the world, and it's not pretty.

:notwant:

Custom Personality Core
I'm in the process of building one from scratch in Blender. I will emulate as near as possible the relevant animations from the main personality core model. The model will be implemented in game as a prop_physics, and animated by a combination of trigger brushes. It seems feasible to emulate most of Wheatley's behaviors this way, and I was wondering if anyone had tried something like this.

In addition, I'm having some issues making this guy distinct. In the first place, he'll be physically different from the normal cores simply by virtue of being a custom-created model, but I want him to be different at a glance. Which leads me to the very silly question, what color do I make his eye? His core personality trait is

Spoiler
paranoia
, which is a major driving force behind the story, so I'll have some animations to convey that, but I need to come up with a way to color the player's impression of him through the personality core equivalent of body language, and eye color is a big part of that. (Tell me you would have trusted Wheatley at all if his eye hadn't been that cheerful, friendly blue color.)

Interaction With Atlas/P-Body

My custom core, who so far is only known as

Spoiler
Paranoia
Core and is not yet named, will lead the player into a BTS area where they will observe Atlas and P-Body (prop_dynamic or prop_pysics models - I'm leaning towards the former, but may have to use the latter for reasons explained in the very next paragraph) being outfitted with ASHPDs. A conveyor belt then carries the bots up to a couple of pneumatic pipe intakes, then there is a brief pause, an offscreen explosion, and the bots respawn to be outfitted again. This will continue until the following event.

On an area trigger, the Personality Core will bump Atlas into a grinder and prompt the player to take his place to be outfitted with an ASHPD (probably mandating Atlas being a prop_physics for best appearance).

This is where things take a (thankfully temporary) turn for the "what the heck are you getting yourself into, idiot?" and I attempt to make a map that doesn't behave normally.

The map is intended to conclude with a dirt-simple tail-end-of-a-coop-map area where the two bots have clearly bypassed a long series of extremely brutal puzzles. All that's left is a couple of things for the player to do. To emulate coop play without actually requiring an AI or a full-fledged mod, I plan the following:

1) The ASHPD the player has will not be fully upgraded.
2) The P-Body entity will follow a strictly scripted path, guiding the player through the remainder of the map. env_instructor_hint entities should do a fair approximation of the ping system, letting P-Body tell the player what needs to be done.
3) If need be, once the portals are in position, I will replace P-Body with an identical prop_physics (the puzzle involves him hopping onto a faith plate) and swap that back out again after he arrives at his destination.

The things I need to know to make this happen:
1) Can prop_dynamic entities be affected by the script that makes Faith Plates work?
2) I presume there's no feasible way to just change an entity's type, but assuming there is, would that work?

Yes, this is all insanely ambitious. Fortunately, it's only for the one map. Further maps in the story would follow a more normal single-player progression.

No, only physics. Try using scripted_schedules for NPC-like motion. Phys_convert turns any entity into prop_physics. I'll fill this out more asap.

EDIT: Okay, I have more time now.

A generic_actor and aiscripted_schedule is the best way to get a walking NPC. The way VALVe did it the one time you see P-Body in SP is to bake in a custom animation, but that's really hard. I believe actors can be faithplated and such, and you can make some system to send the NPC to arbitrary locations in Hammer.

For the personality core, remember that physics and animations don't mix. Probably the best way to do it would be to make your new model, use the Face Poser to do your choreo, then use a one-line VScript to swap out the model of an npc_personality_core.

And a phys_convert will help for some of the things you want. You can use AddOutput classname to change the class of an object, but it won't change its behaviors, only how filters affect it.

Falsi sumus crusto!
FelixGriffin wrote:
A generic_actor and aiscripted_schedule is the best way to get a walking NPC. The way VALVe did it the one time you see P-Body in SP is to bake in a custom animation, but that's really hard. I believe actors can be faithplated and such, and you can make some system to send the NPC to arbitrary locations in Hammer.

I shall make a quick dummy routine to try this out. If I can get this thing to even pretend to behave, I will be happy.

FelixGriffin wrote:
And a phys_convert will help for some of the things you want. You can use AddOutput classname to change the class of an object, but it won't change its behaviors, only how filters affect it.

Well, that saves me from having to try that incredibly kludgey workaround I was thinking of... I think. We shall soon see.

Edit: Not gonna work. I'll try scripted_sequence instead, it offers a lot more control.

It certainly does, just remember to rebuild scenes.image if you modify anything in Face Poser.

Falsi sumus crusto!
FelixGriffin wrote:
It certainly does, just remember to rebuild scenes.image if you modify anything in Face Poser.

I'm doing all this to avoid having to reubild scenes.image. Sadly, scripted_sequence is teleporting my model around, which means I'm going to have to do even more work to get this dang thing to work as intended. Blargh.

Change "Move to Position" to 0 ("No"). ;)

Falsi sumus crusto!
FelixGriffin wrote:
Change "Move to Position" to 0 ("No"). ;)

That doesn't actually help. My problem isn't that it's moving the model, it's that all of the movement types bypass any sort of actual movement and just teleport the model there. This brings me back to parenting the model to something else and operating it like a puppet, which I may end up doing anyway. Portals are going to be a bit of a challenge, though. I may have to fake them as well. (Have multiple puppets with collisions off so they can pop out from behind walls and such.)

I'll continue testing various ideas while I work on the level itself. The uglier the behind-the-scenes workaround, the less I'll want to use the character... Thankfully, I haven't got a deadline or anything.

Hm, that isn't good. It sounds like VALVe broke more of the NPC movement code than I had thought.

EDIT: Actually, they seem to have just renamed the activities. Try using Custom Movement and ACT_MP_RUN.

Falsi sumus crusto!
FelixGriffin wrote:
Try using Custom Movement and ACT_MP_RUN.

Trying it now! :notworthy:

Edit: Still a no go. The sequence itself runs fine using both animations and actions (tried both ACT_MP_DROWNING_PRIMARY and taunt_big_wave), but he still teleports around...

...

...

Wait...

What if the sequence action is itself walking...? ....... That would be so awesome if that worked, though it would more than double the number of entites needed to make it work.

Oh, well, so I'll have more of those. I can always cut back a bit on props...

Further Edit:
That, too, is a no-go. Puppetry ahoy!

Try a scripted schedule? I'm out of ideas too. Sorry.

Falsi sumus crusto!
Page 1 of 4Next