New and Simple Created 7 years ago2017-07-18 12:52:19 UTC by Screamernail Screamernail

Created 7 years ago2017-07-18 12:52:19 UTC by Screamernail Screamernail

Posted 7 years ago2017-07-18 12:52:19 UTC Post #336115
Hi...

I'm a new member here. Anyway.

I have made a model and compiled it for goldsource. In hammer i put it as a monster_generic and used scripted_sequences to make it walk. It teleported without displaying the walk animation.

Is it possible to make a monster_generic walk?
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-18 13:29:59 UTC Post #336117
In scripted_sequence change "Move to position" to walk and check if it'd work. Not sure how it'd work on monster_generic, but should work for monsters like zombies and such.
Posted 7 years ago2017-07-18 13:46:44 UTC Post #336118
...or just code a new monster.
Posted 7 years ago2017-07-18 14:27:31 UTC Post #336119
It seems hard but i can probably do it.

EDIT: But i can't download hlsdk for some reason.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-18 14:36:35 UTC Post #336120
Something tells me you're doing it wrong if you can't download the SDK.

Are you sure you're getting the right version? https://github.com/ValveSoftware/halflife

Edit: As a slight addendum, you should never use monster_generic or any of the pre-built model displaying entities. Code your own, it isn't difficult and offers more flexibility.
Posted 7 years ago2017-07-18 14:44:36 UTC Post #336121
Is it? It seems pretty hard to me. But i can try.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-18 15:17:57 UTC Post #336122
You can copy the code of another monster (monster_barney or monster_scientist for example) and change the model later on. I'm not a coder, but I have an idea how does all this work.
Posted 7 years ago2017-07-18 15:45:01 UTC Post #336123
Actually i followed the "Coding NPCs in GoldSrc" tutorial and are on the 2nd page. I want to see my monster ingame but don't know how.

Must i change the fgd?
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-18 16:16:42 UTC Post #336124
You need to modify the .fgd to accommodate for your new entity. Or manually type out the entity in Hammer/alternative.
Posted 7 years ago2017-07-18 16:17:50 UTC Post #336126
Okay but must the monster data be in a specific place?
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-18 16:20:36 UTC Post #336127
What do you mean by that? The .fgd? Or the code?

You can pretty much put it anywhere in the .fgd. I at least recommend putting them after the base classes and into the generally defined monster section.
Posted 7 years ago2017-07-18 16:21:25 UTC Post #336128
I mean the CPP.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-18 16:26:24 UTC Post #336129
Just make use its in the server folder. Don't forget to set the new entity name it can be referred to by.
Posted 7 years ago2017-07-18 16:36:45 UTC Post #336130
You mean the "valve" folder in the main? Sorry i'm just not good at talking, never had been talking about stuff like this.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-18 17:13:37 UTC Post #336133
Your.cpp file containIng your code should be inside of the /dlls folder in the SDK…
Posted 7 years ago2017-07-18 18:12:28 UTC Post #336136
The one i downloaded from github? Well now i put it there but when i test the monster the console say that the game can't initialize it.

Should i send a screenshot?

EDIT: Actually i can just make a journal out of it.

EDIT:
User posted image
This is the CPP. It work or?
User posted image
This is the fgd. Is this how it's done?
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-18 20:55:33 UTC Post #336143
Those image links give me errors.

Also, question about the model you compiled: monster_generics can and do walk when told to as ive done a lot of use with those entities, so im wondering if the root cause is a lack of motion extracted forward movement in the animation.

For example if you rigged from a playermodel animations where the model walks in place.
Posted 7 years ago2017-07-18 20:57:03 UTC Post #336144
Use Imgur for Christ's sake. No one wants to sign up to see a damn image.
Posted 7 years ago2017-07-18 22:45:23 UTC Post #336147
He isn't using the stock skeleton. He made his own bones. Does he need a specific walk animation name?
Tetsu0 Tetsu0Positive Chaos
Posted 7 years ago2017-07-19 00:09:04 UTC Post #336148
No, but it does need an ACT_WALK/RUN for the AI to identify the sequence as a walk for example from the Hgrunt:
$sequence walk1 "hkwalk" LX fps 30 looping ACT_WALK 1
$sequence run "run2" LX fps 30 looping ACT_RUN 1
Posted 7 years ago2017-07-19 05:37:48 UTC Post #336149
I have had the same problem, finally I have made a barney clone and used it to make "actors" that walk, patrol, etc. The monster_generic just teleports from A to B. Also, but not tested, I found the playermonster entity in the sdk, is is suposed to be used as an "actor" model in scripted sequences, but, I repeat, even If I know it is present in the SDK 2.3, I did never tested and prefer to create a copy of barney, that I know will work 100%. :)
Posted 7 years ago2017-07-19 11:27:46 UTC Post #336150
So i can't link images from the Hive Workshop without it being public?
Okay

Anyway
No, but it does need an ACT_WALK/RUN for the AI to identify the sequence as a walk for example from the Hgrunt:
$sequence walk1 "hkwalk" LX fps 30 looping ACT_WALK 1
$sequence run "run2" LX fps 30 looping ACT_RUN 1
i did this actually. It look like

$sequence idle1 "anims/idle1" fps 15 loop ACT_IDLE 1

$sequence walk "anims/Walk" lx fps 30 loop ACT_WALK 1{
{ event 1004 38 "footstep1.wav"} { event 1004 76 "footstep3.wav"}
}

$sequence run "anims/Run" lx fps 20 loop ACT_RUN 1

EDIT: I am going to start remaking the models and their animations. Expect a new thread.(When i'm done with some models)
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-19 15:34:48 UTC Post #336154
Okay if you are making new animations are you sure that the walk animation is not "in place", because LX motion extraction is taken from the animation root bone itself to move the NPC. If you don't know what I mean import a walking SMD and you will see that the root bone moves forward in a linear fashon in addition to the walk animaiton.
Posted 7 years ago2017-07-19 16:15:34 UTC Post #336155
So if i move the whole model in object mode, the character moves?

EDIT: Okay that was stupid.

EDIT: Can i see the process in a video?
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-19 17:05:18 UTC Post #336156
I'm glad I don't do modelling for GoldSrc.
Posted 7 years ago2017-07-19 17:13:25 UTC Post #336157
I admit i can't these kind of things because i never tried it. I don't know how to make OR even know what a root bone is. But if i will ever know it then i need to learn it.

I use Blender. Please. Just say what i need to do.

EDIT: Or i can just do this project of mine in unity and release it on the 3ds.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-19 18:38:05 UTC Post #336158
@abbadon playermonster is never used in the retail game IIRC.

@Windawz it isn't hard at all. He's just making it seem difficult. Like programming for GoldSource we well in a sense.

@Screamernail you need to learn it first instead of having people tell you how.

I feel like you need to learn the needed/proper terminology first before embarking on something like this. That's just what I think. Then learn the syntax and the very basics of modeling for the GoldSource engine. Then try to make your own monster and models that use ACTS.
Posted 7 years ago2017-07-19 19:02:25 UTC Post #336159
Yes, but, why is it present in the SDK?, also, you can compile it and insert it in the fgd. :( Do you mean the even if I do that it will not work?, what a pity!! :(
Posted 7 years ago2017-07-19 19:07:17 UTC Post #336160
The SDK has old cine monster entities in it as well, they're useless because they were hardcoded for presentations. Valve just didn't clean it up before releasing it.
Posted 7 years ago2017-07-19 20:48:16 UTC Post #336165
@Screamernail Root bone of most if not all HL1 skeletons is "Bip01":
User posted image
As for walking im using an example from the gordon scientist model in bshift who's walking sequence moves Bip01 forward about 48 units (-48Y as it says in the blender inspector) which means he will move 48 hammer units per animation cycle (how ever many frames at how ever fps).
User posted image
Now an important thing to note is that if you are animating root movement is that you make your keyframes linear or in blender you set the keys in the curve editor to "Linear Extrapolation".

You can see other movement speeds by importing other models animations/run sequences to see how they were done.
Posted 7 years ago2017-07-19 20:50:47 UTC Post #336166
@Windawz
You'll be so, so sorry you don't do modelling in GoldSRC...
Do you have any idea about the feeling when you make your first hi-poly barrel in 3DS Max and export it to GoldSRC and use it in your map?

...

No? Fine. I'm as lazy as you, so don't worry. :P
Admer456 Admer456If it ain't broken, don't fox it!
Posted 7 years ago2017-07-20 11:43:38 UTC Post #336168
@The303
Okay let me think.

If i make a new bone (In the same armature as the rest right?), put it in the models origin, parent the rest of the armature to it and call it Bip01, the character will be able to move?

I should try. Thanks
User posted image
Now what?

EDIT: I'm terribly confused about what to do with the other bone. Must i make a new armature or...?
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-21 02:00:05 UTC Post #336183
No, you dont need to make a new armature. What you did making a new bone and parenting the armature to it should make it the "root" of the armature. and "Bip01" isn't a must-have name, just as long as the bone is the root bone.

Now basically in order to make it "move" you make a walking animation and have the root bone keyframed to move forward a set distance (depending how fast your custom NPC is moving) and with linear keyframes for just that root bone. See my above example of that scientist walk. But if you are still trying to get this working mabey just have a simple movement if you dont already have an animation ready.

Now one thing that I may not know is that I mainly work in 3DSMAX where the root bone has a world rotation of X0 Y0 Z-90. Im not sure how to check this in blender so depending on the root rotation it may need a different extraction: for example:
$sequence walk "anims/Walk" lx fps 30 loop ACT_WALK 1
LX may have to be changed to LY or LZ.

The way I tested to see if extraction is working is open the compiled model in HLMV and go to the "walk" animation. If it is walking in place then the extraction worked, if not then try a different once other than LX.

It also just so happens that I have a test model that walks very slowly with no other animations and has a custom skeleton if you want to examine: www.the303.org/stuff/root_test.rar

EDIT: Also when exporting with blender, make sure to uncheck "Implicit motionless bone" on the SMD tools export settings. That will likely mess up your skeleton hierarchy.
Posted 7 years ago2017-07-21 07:58:58 UTC Post #336189
https://www.youtube.com/watch?v=cGvalWG8HBU I'm gonna follow this for it.

And yes, i followed Tetsu0's tutorial about the "Implicit motionless bone" thing.

Thanks

EDIT: It worked! But the legs are too separated. Might just fix that.
Screamernail ScreamernailYour personal Fear
You must be logged in to post a response.