Re: Adding an NPC to a Dod map
Posted by Crono on
Tue Feb 24th 2004 at 1:13am
Crono
super admin
6628 posts
700 snarkmarks
Registered:
Dec 19th 2003
Location: Oregon, USA
I'm working on a dod map (no screen shots, because they're not needed here) and I wanted to make an NPC on the german side, which the allies have to kill as an objective, however, I went into the dod FGD and found there's no Monster support.
So, I was wondering if any of you Snarkpitians here have been able to add an NPC specifically in dod.
Also, If I just edit the FGD code for dod, would it actually show in the final map? I mean I could probably add in the monster functions and whatnot, being that HL already supports NPCs.
Any thoughts on the topic would be helpful, Thanks.
(Not to mention if I were able to do this I could make some SP maps for Dod :biggrin: )
Re: Adding an NPC to a Dod map
Posted by Hugh on
Tue Feb 24th 2004 at 2:34am
Hugh
member
900 posts
207 snarkmarks
Registered:
Oct 25th 2003
Occupation: College Student
Location: Amerika
It depends on what you want the NPC to do. If you want it purely to die as an objective, I think it might be possible. However, if you want it to actually move around and do stuff, then no.
Re: Adding an NPC to a Dod map
Posted by Gorbachev on
Tue Feb 24th 2004 at 2:38am
1569 posts
264 snarkmarks
Registered:
Dec 1st 2002
Location: Vancouver, BC, Canada
Just use env_model and put a player model in there, there are also grunt models in the main models directory. I'll add this to the list of stuff to put in my big DoD tutorial. Basically have the env_model surrounded by a func_breakable that triggers the proper scoring entities when shot.
Re: Adding an NPC to a Dod map
Posted by wil5on on
Tue Feb 24th 2004 at 3:58am
wil5on
member
1733 posts
570 snarkmarks
Registered:
Dec 12th 2003
Occupation: Mapper
Location: Adelaide
My DoD fgd seems to have a bunch of monster_ entities. They are screwy, tho. Do what Gorby says.
Wacokid - wtf?
Re: Adding an NPC to a Dod map
Posted by Crono on
Tue Feb 24th 2004 at 4:07am
Crono
super admin
6628 posts
700 snarkmarks
Registered:
Dec 19th 2003
Location: Oregon, USA
Well, see, the thing is that I want the NPC to do stuff, basic stuff, but stuff nonetheless.
So, I suppose what I'm really asking is: would it be possible to put in a moster script (assuming that NPC scripting is supported by dod's HL.exe, which it should be) and then include some model sprites of my own . . . ?
I'm pretty sure I can, but I wanted to check to see if any of you have tried it yet (and if so what you did).
I'll give Gorbs suggestion a go and wait for some more responses before I mark anything right or wrong :smile:
I more or less want an NPC who can also defend himself and I know if I put in the little code it takes in the FGD (meerly copying it from another FGD like Opposing Force) I could just change the sprite animations, but it should be reconized by HL . . . (this is the part I am concerned about).
Anyway, thanks for the input and suggestions so far
(by the way, Hugh . . . you might want to rethink your 'no', I mean, I know it can be done some way, that's not what I was really asking, I more or less asking for suggestions of how.)
Gorb, a ... er ... The dod tutorial would be lovely. The only things I've ever found in regards to DOD mapping was the gun penetration unit sizes on the collective. . .and the entities, which for some reason have descriptions which are the same as the title.
[EDIT]
Odd . . . the dod fgd I'm using doesn't have env_model, any particular version of the fgd you'd suggest? Because I remember it being there before.
[/EDIT]
Re: Adding an NPC to a Dod map
Posted by Hugh on
Tue Feb 24th 2004 at 4:26am
Hugh
member
900 posts
207 snarkmarks
Registered:
Oct 25th 2003
Occupation: College Student
Location: Amerika
You might want to rethink your "no" to my "no" once you've actually tested it. :wink: If it could be done some way, and someone in here actually knew how, wouldn't it have been done before? :dorky:
And just because HL supports NPCs doesn't mean mean that mods do. What non-coop MP mod have you seen that has NPCs? And I don't mean to sound like an asshole, but I'd just be really surprised if it could be done and hasn't already been done. Especially with an env_model, considering that they have no AI, considering they're used for decorative map models.
Re: Adding an NPC to a Dod map
Posted by Me2 on
Tue Feb 24th 2004 at 5:49am
1 post
0 snarkmarks
Registered:
Oct 29th 2003
Occupation: Student
Location: California
ok, heres the probelm with adding an NPC to DoD:
Day of Defeat was not designed to be any type of hostage rescue/assassination MP game, or an SP game. Thus, there is no support for monster_whatever and, more importantly, there is No AI. So, I don't see any way of accomplishing this without actually modifying the DoD code itself. My suggestion, though not as aestheticly pleasing, is to make a cardboard cut out looking thing and make it a func_breakable. Other than that you can't do much
Re: Adding an NPC to a Dod map
Posted by Tracer Bullet on
Tue Feb 24th 2004 at 6:04am
2271 posts
445 snarkmarks
Registered:
May 22nd 2003
Occupation: Graduate Student (Ph.D)
Location: Seattle WA, USA
DoD has spirit code right? you could probably fake it pretty nicely by making the model "move with" a func_train. it might look kinda silly if done wrong, but maybe you could have the guy paceing back and forth in a room or somthing, and you need to blow up the building or snipe the guy or somthing.... I don't know what you've got in mind though.
Re: Adding an NPC to a Dod map
Posted by Crono on
Tue Feb 24th 2004 at 6:09am
Crono
super admin
6628 posts
700 snarkmarks
Registered:
Dec 19th 2003
Location: Oregon, USA
Actually TB, that's pretty close. I wanted two NPC's actually, one would be holding a set of keys which lead to a room with a Nazi commander, and his elimination would be part of the allies objectives for the map. Both of the NPCs would do something like pace around. (meaning they don't have to fight back, but, it'd be nice lol)
[EDIT]
Keep the suggestions coming guys, these all sound plausible, for the most part
[/EDIT]
[response to wil5on down below]
I never said the FGD is code for HL, I know it's definitions for Hammer, but my point was that the HL code should be there to support an NPC, but if it isn't, not a big deal, I could just have it so that a player gets an object or something and they have to be killed for an objective to be gained. But to do something like that it would have to be randome (such as the object is above one of the spawn points, so whoever randomly generates there would become an objective . . . but if there isn't anyone there, then the object would just lay there, and someone would have to pick it up, it'd be weird. These are just ideas I'm having to get around it some how. . .I mean I don't have to impliment this, but it'd be nice is what I'm saying.
[/response to wil5on]
Re: Adding an NPC to a Dod map
Posted by wil5on on
Tue Feb 24th 2004 at 6:10am
wil5on
member
1733 posts
570 snarkmarks
Registered:
Dec 12th 2003
Occupation: Mapper
Location: Adelaide
From what I've seen, the monster_ entities in DoD are unfinished. My theory is, they planned them at one point, they were too hard to code (or they didnt have time) but they left half-finished code in there, so there are NPCs in DoD, but they are pretty crappy.
Crono, you cant add entities into the game thru the FGD. The FGD only tells teh Hammre what entities can be used by that mod. The mod DLL contains the actual code for the entities.
Me2's idea is good, however, you can do better than a "cardboard cutout". You need an env_model or somesuch, enclosed in an invisible func_breakable. When you kill the func_breakable, you turn off the env_model with env_renders. Look up a tut on CS chickens, its basically the same thing.
[EDIT] TB, DoD has some spirit code. It is, however, extremely buggy. I dont think it has movewith.[/EDIT]
Re: Adding an NPC to a Dod map
Posted by Hugh on
Tue Feb 24th 2004 at 6:10am
Hugh
member
900 posts
207 snarkmarks
Registered:
Oct 25th 2003
Occupation: College Student
Location: Amerika
If you use movewith like that, he'll move like he was in South Park.
Re: Adding an NPC to a Dod map
Posted by Tracer Bullet on
Tue Feb 24th 2004 at 6:40am
2271 posts
445 snarkmarks
Registered:
May 22nd 2003
Occupation: Graduate Student (Ph.D)
Location: Seattle WA, USA
That's what I meant about it looking silly. Why don't you look at Gollum's boulder tuts? that thing is nicely animated, I bet you could adapt his method to your purposes.
Re: Adding an NPC to a Dod map
Posted by Crono on
Tue Feb 24th 2004 at 6:57am
Crono
super admin
6628 posts
700 snarkmarks
Registered:
Dec 19th 2003
Location: Oregon, USA
Actually I'm thinking a mixture of your earlier suggestion, TB, and Gorbs suggestion would suffice. I downloaded the dod 1 fgd, I was using expert 2, so I popped an env_model in there, however, now Half-Life gives me a ' "Mod_NumForName" path of model "is missing" ' error when the map is ran, it's quite bizarre. I'm sure there's some parameter I'm missing, but I'm not really up to thinking about it tonight.
Anyway, thanks you guys, I'll keep trying your suggestions until I get the desired effect (then I'll mark people correct or not)
Re: Adding an NPC to a Dod map
Posted by Crono on
Tue Feb 24th 2004 at 7:27am
Crono
super admin
6628 posts
700 snarkmarks
Registered:
Dec 19th 2003
Location: Oregon, USA
Yeah it would be sweet. However, Medal Of Honor is based on the Quake engine as well, so techincally it's it too. But there's just something about Dod. . .dunno what it is though.
Re: Adding an NPC to a Dod map
Posted by Yak_Fighter on
Tue Feb 24th 2004 at 8:07am
1832 posts
742 snarkmarks
Registered:
Dec 30th 2001
Occupation: College Student/Slacker
Location: Indianapolis, IN
The guns feel powerful, the movement feels rock solid, has that old HL charm...
Re: Adding an NPC to a Dod map
Posted by Crono on
Tue Feb 24th 2004 at 8:27am
Crono
super admin
6628 posts
700 snarkmarks
Registered:
Dec 19th 2003
Location: Oregon, USA
Gorb, I didn't mean he'd literally would be holding a key, it would act like an object if it weren't an NPC, meaning I could put a symbol over their head. But I'm going the rout you suggested, and most of what you posted I've already started to think about trying. Thanks. Also, forget the error comment I realized it was from Steam needing a res file for the map.
Anyway, Gorb, great ideas. Thanks. (TB deserves a little credit too though, for his func_train comments, when he said that it sort of clicked in my head, hey you can play the walking animation and blah blah blah)
[EDIT]
Damn, still get that freakin' error. I generated a res file for the map and it has the paths for the model and such . . . still isn't working . . . hmm
[/EDIT]