Garry's Mod

Garry's Mod

2,821 ratings
NPC Scene
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Movie, Scenic
File Size
Posted
Updated
0.592 MB
Jan 18, 2013 @ 9:34am
Apr 30 @ 12:18am
37 Change Notes ( view )

Subscribe to download
NPC Scene

In 3 collections by Xalalau
Brasil - Supremacia
100 items
GMod Gold Animator's Collection
99 items
Gravação
55 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 (16)
10
Aug 3 @ 6:19am
Umpa [SOLVED]
Pjazerlazer
5
Feb 11, 2020 @ 8:27am
Help with NPC Scene Gman_Out
Deep
2
Nov 7, 2020 @ 3:34am
What is your favourite use for this addon?
Jasperdoit
< >
681 Comments
charmander Sep 23 @ 5:36pm 
retard
whitetubby201 Aug 10 @ 11:33am 
Hey Xalalu Can You Add The Outland_12a? from half life 2 episode two.
BraydenWarren Aug 6 @ 11:34pm 
what does it say !target1 and !target2 citizen could help with this
. Jul 30 @ 1:51pm 
left 4 dead 2 animations don't work,i tried changing the names,i tried to play some Zoey scenes but they just don't work,and i have L4D2 and L4D1,console says nothing tough
George Carlin Jul 29 @ 2:44am 
Is there a way to add a feature to make your own scenes only with Garry's Mod? What I mean by that is that you can record your playermodel at a certain time and stop recording it. And with that, it becomes a scene and you can replace the model that you recorded with and put any other playermodel on it? Similar to the Blockbuster mod for Minecraft?
vh14a Jul 22 @ 1:26pm 
thanks
Xalalau  [author] Jul 22 @ 11:39am 
Hey, take a look at my new addon:
https://steamcommunity.com/sharedfiles/filedetails/?id=2553727051

@vh14a
Check "Extract vcd files from Source games" section
vh14a Jul 19 @ 1:29pm 
hey quick question is their a way to get black mesa scenes
whitetubby201 Jul 15 @ 11:26pm 
arlight