Garry's Mod

Garry's Mod

2,959 ratings
NPC Scene
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Movie, Scenic
File Size
Posted
Updated
0.614 MB
Jan 18, 2013 @ 9:34am
Dec 19, 2021 @ 2:09pm
38 Change Notes ( view )

Subscribe to download
NPC Scene

In 3 collections by Xalalau
Brasil - Supremacia
105 items
GMod Gold Animator's Collection
98 items
Gravação
56 items
Description
-----------------------------------------------------------
BRASIL, Junte-se: https://discord.gg/ytkXGNU
GMBR, criadores BR de addons e vídeos e tudo.
-----------------------------------------------------------

TOOL DEV STATUS: BUG FIXES ONLY

From 04/12/2021 onwards I'll only be providing fixes for this tool, so I can focus on other projects.

Thank you all for your support and dedication so far.


Introduction

You can play animations from .vcd files with NPC Scene, that's it.

The addon started as a fix for the old v1.2[web.archive.org] but over time it became a new tool.




How to ensure that the scenes will play

Sometimes, the scene doesn't play if the game fails to detect an actor with the right name. If you encounter this situation, inspect the console for missing names and use the tool to properly define them.



Another problem is playing TF2 scenes. If you can get the list, NPCs will only play sounds and change expressions, but won't have lip sync or animate. Apparently TF2 uses a different phonemes table than that of hl2, and I don't know much about the animations. But I remember that Model Manipulator can set a NPC like Father Grigori to a Standard TF2 ragdoll like Heavy and at least this new entity will move.


Games Support

Half-Life 2 scenes are always included.

These games will have the scenes available when mounted:
  • Half-Life 2 Episode 1
  • Half-Life 2 Episode 2
  • Half-Life 2 Lost Coast
  • Left 4 Dead 2

I won't add support for:
  • Left 4 Dead, because it's included in L4D2

I wasn't able to get the scenes from:
  • Team Fortress 2
  • Portal
  • Portal 2


hlfaceposer.exe: Create your own scenes / Automatic lip sync
You can add scenes to the game by placing vcd files in "garrysmod\scenes" (or "garrysmod\addons\myaddon\scenes") folder. They are created in hlfaceposer and you can read the "Choreography creation" guide to fully understand how they work.

However, running hlfaceposer nowadays is a problem, so I'm going to provide instructions on how to do that and get the automatic lip sync working.

The good news is that you can quickly get a good version of this program by installing Half-Life 2 and extracting this zip into it:
https://mega . nz/file/dNE2zD4a#Mg92cc7krQqPq49sjobX_9PL0NaOT1TQucJkrZ40E3E.
Open "Half-Life 2\bin\hlfaceposer.exe" and you're ready in this part.

But if you want a better explanation or to workaround the problem yourself (sometimes with newer file versions), follow these steps:
1 - Forget the current GMod's hlfaceposer (21.07.13), it likes to crash more than expected;
2 - Download HL2 and Source Filmmaker;
3 - Copy "Half-Life 2\hl2\gameinfo.txt" to "Half-Life 2\bin";
4 - Copy "SourceFilmmaker\game\bin\lipsinc_data" to "Half-Life 2\bin";
5 - Open "Half-Life 2\bin\hlfaceposer.exe";
6 - You're ready to create scenes.

Now you can also use the automatic lip sync without crashing:
1 - Load a model (File -> Load Model);
2 - Open the "Phoneme Editor" (a tab at the bottom). The next steps will be on it;
3 - Configure the lip sync API by right clicking on the empty space, selecting "Change Speech API" and checking "Lipsinc Speech API";
4 - Press CTRL + O to load a .wav file from your character
5 - Press CTRL + R to do the automatic phoneme detection;
6 - Right click on the empty space and select "Commit extraction" to apply the phonemes;
7 - Press CTRL + S to save the mouth animation in the .wav file;
8 - Copy the sound file to your game;
9 - Open the game to see it working.

I'm dubbing all Half-Lifes into my native language with a team and we've been using this method in HL2 for a while now. Take a look: https://www.moddb.com/mods/half-life-1-dublado-pt-br

There're more ways to make hlfaceposer work but this one is my favorite. It's reliable enough for us, good enough for a Windows XP program.


Extract vcd files from Source games
Valve has been compacting the vcd files into scenes.image for optimization, so, if you want to use "fresh" animations, you'll have to convert then back first.

However, there is a catch here. The file names have been transformed into CRC, which is an irreversible checksum. As far as I understand, it's only possible to retrieve these names by crossing the contents of scenes.image with maps, and in my experience many of the vcd files remain without a proper name even after that. I tried on my own to also get the names directly from scenes.image - from a location called "strings pool". I couldn't get all the names either, and my attempts to read the vcds theirselves were crashing the game.

If you want to try anyway, use GCF Scape[nemesis.thewavelength.net] to extract scenes/scenes.image from the (probably) "misc" VPK of your game and use VSIF2VCD to extract the vcds. Note that VSIF2VCD asks for a maplist.txt file to be in the root folder of the game in order to obtain the original file names, so I usually create one myself. It's like:

d1_canals_12
d1_canals_13
d1_eli_01
d1_eli_02
d1_town_01

At the end the extracted scenes will be inside the scenes folder.


Source code
If you want to check the code, here it is:
https://github.com/Xalalau/NPC-Scene


Special thanks
Testers: HomemCamisinhaCósmico and Pepeu.


Cool things
Enable "Apply Scenes Multiple Times" and...
- Try spamming "scenes/trainyard/cit_scan_id" on a citizen.
- Try using "scenes/trainyard/cit_breenagain" on Breen.
- Try spawning Alyx, naming her "Alyx", spawning GMan, naming him "gman" (case sensitive), and run "scenes/citadel/al_end" on Alyx. Spam it like hell (ALOT, FAST).
- (by y0ng $ack) scenes/eli_lab/attack04.vcd: Spawn DOG, name him "Dog" and spawn Alyx, name her "Alyx" then spam it like crazy. Enjoy.
- (by Herr Doktor von Nuremberg) If you spam cit_tooloud on a male citizen/rebel model (doesn't work on female for some reason), you'll get some interesting results.
- (by Fatmeatball) If you spam crowbar_intro on Barney, the scene just continues getting better.
- Here are some old, cool and broken addons:
- Dance Animations[web.archive.org]
- Npc Animation V4[web.archive.org]
- Cremators animation pack[web.archive.org]
- Cra0kalo's Animations[web.archive.org]
/\ /\ /\ DOWNLOAD BACKUP:
Mirror 1: https://mega . nz/#!ddkHFaQR!KO_TE3rcZ8nCDo0L0KK-KSmi2CntAHgJDFtghB7fyNw
Mirror 2: http://www. mediafire .com/download/kosy9wj09fjnu21/gmod+animation+stuff.zip
Popular Discussions View All (18)
11
Feb 5 @ 6:11pm
Umpa [SOLVED]
Pjazerlazer
5
Feb 11, 2020 @ 8:27am
Help with NPC Scene Gman_Out
Deep
3
Dec 5 @ 2:54am
What is your favourite use for this addon?
Stupid Cat >:(
< >
712 Comments
brennan Oct 27 @ 6:14pm 
sowwy
brennan Oct 27 @ 6:14pm 
its on posing are you stupid
cherryonmay Oct 1 @ 9:33am 
where do i find the tool?
Hunter-Chopper Sep 27 @ 3:36pm 
can i make striders come out of the ground like they did in that one scene?
Xalalau  [author] Sep 24 @ 9:06pm 
I've actually been playing since GMod 9 in 2007. My first addons were deleted with garrysmod.org when Garry moved to Workshop, but they were just silly things.
Destroyer_Jayy Sep 24 @ 5:24pm 
bro started gmod making bangers
israelito Sep 7 @ 8:48pm 
how do i make npcs move?
GamerGod Aug 14 @ 3:54pm 
support for custom audio files?
GamerGod Aug 14 @ 3:51pm 
how i unbind a key in the config for him talk?
israelito Aug 9 @ 2:19pm 
how do i make npcs move