Garry's Mod

Garry's Mod

3,216 évaluations
NPC Scene
2
   
Récompenser
Ajouter aux favoris
Favoris
Retirer des favoris
Type de contenu: Addon
Type d'addon: Outil
Mots-clés d'addon: Film, Scénique
Taille du fichier
Publié le
Mis à jour le
626.043 KB
18 janv. 2013 à 9h34
4 mars à 12h54
41 notes de changement ( voir )

S'abonner pour télécharger
NPC Scene

Dans 3 collections faites par Xalalau
Brasil - Supremacia
134 objets
GMod Gold Animator's Collection
97 objets
Gravação
58 objets
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)
Discussions populaires Tout voir (20)
1
4 mars à 12h45
I cant find the hl2 files.
Juan José Ortigosa Galvan
11
5 févr. 2022 à 18h11
Umpa [SOLVED]
Pjazerlazer
6
20 mars 2023 à 12h29
Help with NPC Scene Gman_Out
Deep
791 commentaires
Xalalau  [créateur] 18 avr. à 18h24 
Be sure to mount the needed games and name the actors.
CelestialCrowArts 24 mars à 11h17 
No that was plenty thank you. I ended up doing more research on it and its a hammer specific function. Nonetheless still love this tool.
Xalalau  [créateur] 23 mars à 19h12 
My tool just provides an easy way to play VCD files in real time. To use one these animations in Hammer, all you need to do is place some named NPCs and a scripted sequece in the map. I hope this answers the question, because this addon really doesn't need any kind of extra integration.
CelestialCrowArts 23 mars à 14h32 
Fire trigger specifically, for like I/o and such
Xalalau  [créateur] 23 mars à 14h24 
Wdym by scene triggers?
CelestialCrowArts 23 mars à 14h19 
Question, does this tool work with scene triggers?
mariogamerepic74 9 mars à 23h38 
man thank you so much for fixing this :slimehappy:
innyume-kun 9 mars à 4h31 
how do i make npcs walk and talk
Unknown_Error 7 mars à 6h16 
Thank you
Xalalau  [créateur] 4 mars à 12h42 
- Change npc_scene_start to 1 by default;
- Block the tool from applying the same name on a NPC multiple times;
- Add option to keep actor name on reload (defaul is keeping now);
- Change scene loading to support the HL2 Anniversary update.

Better never than late, they say.