Garry's Mod

Garry's Mod

3,195 ratings
NPC Scene
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Movie, Scenic
File Size
Posted
Updated
624.845 KB
18 Jan, 2013 @ 9:34am
2 May, 2024 @ 7:05pm
39 Change Notes ( view )

Subscribe to download
NPC Scene

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

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:

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 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
(How to make UMPA animations work: https://www.youtube.com/watch?v=C0gu9BFau4g)
Popular Discussions View All (20)
11
5 Feb, 2022 @ 6:11pm
Umpa [SOLVED]
Pjazerlazer
6
20 Mar, 2023 @ 12:29pm
Help with NPC Scene Gman_Out
Deep
3
20 Mar, 2023 @ 12:30pm
Cant find the rise and shine one.
Fweggigun
775 Comments
Juan José Ortigosa Galvan 12 Jan @ 11:39am 
It dosent have the hl2 files
sigmasdog:) 8 Jan @ 12:49pm 
why only the prices of left 4 dead 2 only l know recently the twentieth anniversary of half life 2 has arriver and garry's mod displays in the games half life 2 and episodes before it worked for me now too
зато чаёк дают 8 Jan @ 7:08am 
why i have only left 4 dead 2 sounds
just make wear amen to fix the mod because most of the Most of the scenes from halfway to and half life episode two is actually gone missing
Артём 29 Dec, 2024 @ 4:38pm 
why do i have animations from portol 2 how to fix them to animations from half life 2
Bald Noelle 28 Dec, 2024 @ 11:19am 
Will there be a fix for this eventually? Big fan of this mod, and even though I'm aware of the temporary fix, I don't want to use up any more computer space than I have to by duplicating the VCDs.
Cj ROCKS 18 Dec, 2024 @ 8:22pm 
The scenes are still there, you can write the path manually for any scene, they just don't show up... is it posible to fix that?
venom 16 Dec, 2024 @ 1:47am 
thanks!
Xalalau  [author] 15 Dec, 2024 @ 1:25pm 
@venom he fixed it by placing the vcd files directly in the addons/myaddon/scenes folder. NPC Scene searchs for custom vcds, but I don't really recommend creating that many files because the code to load them is at least slower then the one that seems to not be working right now.
Xalalau  [author] 15 Dec, 2024 @ 1:22pm 
I still didn't have time to review the addon, but the issue is likely to be related to the HL2 anniversary update.