Paris' Demo Guide


Paris_NA

 

Posted

Spent a lot of time recently playing with demo files so I thought I'd put together a new guide. You can find a easier to read version on my VG's web page.

Here is a brief outline of how I make a video from action is CoH.

Use /demorecord filename (i.e. /demorecord HamidonRaid) in the game to get a video started. This doesn't create a video, it creates a file based on the CoH/V internal programming.
I use Sloth's Demo Edit and CoH Demo Editor v0.8.9 ]CoH Demo Editor v0.8.9[/url] by Balshor to modify the demo file (though I often end up doing a lot of the editing by hand). Balshor's is particularly useful for changing camera angles and character locations.
I then play the modified demo file with Sloth's DemoLaunch I make sure that I have all my CoH graphics settings turned all the way up at this time.
I use Windows Media Encoder to capture it.
Then I use Windows Movie Maker to cut my new video.

Organization

When you open a demo file with a text editor, you will notice that each line is broken up into 4 sections (though the 4th section can be blank). Every line follows the same format, Time ID Command Variables. For example, 1 0 Version 2 begins every demo file. 1 is the time, 0 is the Object, Version is the command, and 2 is the variable.

The first section designates the Time between the this line and the previous line in milliseconds. Important to make clear, this is not the time that this line takes to execute but the time between the completion of the previous line and the beginning of the current line. Many commands take longer to execute than the amount of time indicated on the next line.

The second section is the ID of the object that the line is about. IDs can refer to characters, NPCs, effects, the camera, and other things. If an object is deleted, it's ID can be reused. Most Object IDs are numbers. 0 is used to set the demo's variables (map, time of day, demo version). I7 introduces 2 new IDs DYNGROUPS and SKYFILE. DYNGROUPS- comes after the time of day line in demos taken in Recluse's Victory and Grandville. It apparently refers to who controls the various sections of Recluse's Victory and is probably used to update the in-game maps of that zone. It is unclear what SKYFILE refers to at this time.

The third section is the Command which either defines the Object, a part of the object, moves the object, or have the object do something.

The fourth section is the Variables for the Command.


The author of this post is speaking in generalities from his personal experience.
Your experience may vary.

 

Posted

Here is a list of the current commands and a brief explanation of what they do.

VERSION- Probably the version of the demo file language.
MAP- This defines the map for the demo, either a zone or a tile set.
TIME- This is the time of day and is always a 0 to 23.99 value.
NEW- Creates a new object. The variable for a NEW command is the Name of the object.
NPC- Defines the Object's costume. Object is usually actually an NPC though Kheldians in their forms will be defined as NPCs.
COSTUME- Begins the definition of a costume.
PARTSNAME- Defines different parts in a costume. After each costume command there will be a series of partsname commands, usually 24.
POS- Position on the map in X Z Y (east/west, up/down, north/south) format. Based on coordinates of the map.
PYR- This describes the orientation of the object (PitchYawRoll). Pitch is leaning forward or back, Yaw is rotational facing from North and roll is leaning to left or right. The most common aspect that changes within the same is the ‘Yaw’ component. With Yaw positive numbers are clockwise and negative anti-clockwise from north. Very hard to work with, I recommend CoH Demo Editor v0.8.9 by Balshor over doing this by hand.
MOV- Movement; emotes, power animations, anything where an object performs some action.
FX- Effects. Much like the creation of an object, an FX command ‘creates’ an effect. There are two general types of effects Maintained and OneShot and one of these designations always follows an FX command. Maintained FX are effects such as hasten, mud pots, super jumping, etc. OneShot FX are animations with limited duration such as attacks. Usually the lines following an FX command contain FXSCALE, ORIGIN and TARGET commands.
FXSCALE ENT- Apparently the scale of the FX, however I have been unable to successfully manipulate this value. Both values are always 10.
ORIGIN ENT- Where the FX is coming from.
TARGET- The Object ID of what the FX is targeted on.
FXDESTROY- Ends an FX.
FLOAT(floatdmg)- This command is usually used to float healing/damage amounts or messages above a character. The first variable after the command is the Object to float the message above, the second is the amount (positive numbers float red damage numbers, negative numbers float green healing numbers), and the third is the message to float if the 2nd variable is 0. Usually float and floatdmg command lines are deleted from a demo file as it clutters up a video.
PLAYER- Defines the Object as the player in the demo. The Player is extremely important as their location effects what will be animated on the screen.
DEL- destroys the object. The object number can then be re-used.
SEQ- Appears to be animation sequences for objects. I have been unable to do anything useful with it.
CHAT- Anything on any chat channels during the demorecord. This includes system messages and anything in any of the chat channels, including global channels. Go here for more info.
HP- The current Hit Points of the Object.
HPMAX- The maximum Hit Points of the Object.

New in I7

BASE- This command appearers when you record a demo in a base. It follows the map command (which has no variable) and the variable seems to be the map of the base encoded in binary.
DYNLIB- I have only run into this command in demos of bases. It comes after a NPC command and apparently supplements it as NPC commands in base demos appear to be limited to v_base_object and v_base_object_unselectable.
DYNARRAY- apparently refers to who controls the various sections of Recluse's Victory and is probably used to update the in-game maps of that zone. 0 DYNGROUPS DYNARRAY |100,0|100,0|66,0|100,0|100,0|100,0|100,0|66,0 is an example of when neither side controlled any part of Recluse's Victory.
SKY- Unclear what this refers to at this time. Every SKY command I have seen is exactly the same except for the time value. 118 SKYFILE SKY 0 1 0.000000
XLU- This command appeared way back in CoH beta and then dissappeared until I7. Not sure what it does even after playing around quite a bit with it.


The author of this post is speaking in generalities from his personal experience.
Your experience may vary.

 

Posted

Many commands come in clusters, that is many commands are found near the same commands each time you find them. For example, you can't create a new object without at least giving it a name, costume, and position. I'll cover the 3 most important; Setting, Object Creation, and Special Effects.

Demo Setting
Every demo file begins with the same three command lines; Version, map and time.

1 0 Version 2
0 0 Map maps/Missions/V_Longbow/Longbow_30/Longbow_30_Layout_01.txt
0 0 Time 6.953883

As you can see the only time in this cluster is for the first command and is 1 millisecond. The Object ID of these commands is 0, which is the entire demo. The Version has never changed. The Map variable is the map the demo is on. You can find most/all maps here.
Time is the time of day and only matters in outside and zone maps. If you are having difficulty with the lighting for a scene try changing the time.

Object Creation
To create an object you start with the NEW command with the name as the variable(the name can be blank). Then a costume, with non-character objects you use the NPC command followed by the skin name. You can find a list of skins here. Then you need to place the object with POS and PYR commands. If you want the object to be doing something specific you add a MOV command followed with one of the MOV variables, which are located here.
So to create Infernal in your demo you would use the following.
0 5 NEW Infernal
0 5 NPC Model_Infernal
0 5 POS ***********
0 5 PYR 0 5 0
0 5 MOV CHEER_A

Creating a player character is more complicated because you need to specify the costume.
The player command is required before the new command for the character that recorded the demo. If there is no Player or the Player is far from where the camera is, the demo will not play correctly. My suggestion is to not change anything inside of a costume, cut and paste a costume from one demo to another. I'll explain a bit about them though.

The 1st variable after the COSTUME command is the Base Model. 0 is male, 1 female, and 4 is huge. It appears that 2 and 3 were set up to be large male and female but it was never supported. This variable affects the costume options available for the character. These are not always obvious so be careful if you manually change a costume.

The 2nd variable is Skin Color. Color is done in RGB Hexadecimal. In Hex, the first two digits is the amount of red, 2nd two is green, and 3rd is blue. FF0000 is pure red, 00FF00 is pure green, 0000FF is pure blue, FFFFFF is white and 000000 is black. Check here for a RGB Hexadecimal Color Chart.
The 3rd is height. 0 is average height and values can range from –99 to 1000.
The 4th is muscle scale and ranges from -1 to 1.
Each partsname command is followed by 5 variables. The first three are costume part skins and the last 2 are the colors. Over the course of CoH the number of PARTSNAME commands that follow a COSTUME command have increased. Currently there are 24 lines. Here is the order that I have been able to figure out. 1- Lower Body,2- Upper Body, 3- Head, 4- Gloves, 5- Boots, 6- Belts, 7- Hair/hats/helmets/masks, 8- Eyes, 9- Upper Face/Forehead, 10- Chest Symbol, 11- Shoulders, 12- Unknown,13- Unknown, 14- Lower Face, 15- Special Arms, 16- Cape Top, 17- Auras, 18- Main Cape, 19- Unknown, 20- Short Skirts, 21- Top: Lab Coats/Robes, 22- Bottom: Lab Coats/Robes, 23- Unknown, 24- Unknown. I have never seen anything but color values in 19, 23, and 24.

Special Effects
Much like the creation of an object, an FX command ‘creates’ an effect. There are two general types of effects Maintained and OneShot and one of these designations always follows an FX command. Maintained FX are effects such as hasten, mud pots, super jumping, etc. OneShot FX are animations with limited duration such as attacks.

Usually the lines following an FX command contain FXSCALE, ORIGIN and TARGET commands.

0 1 FX Maintained 64718 POWERS/LEADERSHIP/LEADERSHIPASSAULT.FX 0
0 1 FXSCALE 10.000000 10
0 1 ORIGIN ENT 0 0
0 1 TARGET ENT 1 0

The first command of an FX cluster is followed by 4 values. The first value is Maintained or OneShot. The second is the ID of the FX. The third is the effect itself. The fourth value if a FX ID. This is used in situations where one FX leads to another such as a shooting FX that leads to a impact FX.

FXSCALE is the scale of the FX, however I have not been able to do anything useful with these values. The 1st value after ORIGIN ENT is the origin of the FX (if it is 0 then it is the Object of the line) and the 2nd I haven't been able to do anything useful with.

TARGET ENT is the target of the fx. Unsure what the 2nd value is and for somereason there will allways be a value here even if the target is the object of the line.

When a maintained FX is over, a FXDESTROY command is used. 0 1 FXDESTROY 64718 would turn off the LeadershipAssault FX from above.


The author of this post is speaking in generalities from his personal experience.
Your experience may vary.

 

Posted


In this section I am going to take a look at a demo I have modified and made into a video. Originally it was against Family but when I was done, I thought, "Heck turn them into heroes." A copy of the demo is here.

The first task is to find everything that is not going to be on screen and delete it. I usually do this by hand, or at least delete the New commands and then use the Fix Ghosts Wizard in Balshor's CoH Demo Editor v0.8.9 to remove the un-used lines. After cleaning it up a bit I put the camera in a stationary position.

Then I turned the Family into the Freedom Phalanx by changing the NPC commands to the new skins. There are many Heroes that I can't find a skin without the little contact circle under them so they had to be ruled out. Ended up using Model_Statesman, Model_Sister_Psyche, Model_Valkyrie, Model_Infernal, and Model_Positron_NoRing (which I got at the 2nd anniversery event). I added some Maintained effects to Statesman and Positron.

Then I spent some time positioning the Heroes so they looked better on the screen. I ended up using a little program called Graph to help me figure out the right coordinates.

Since I had changed some IDs and added additional targets it took some effort to get Full Auto to go off like it does in the game.

After watching the demo I decided it would make a good video but it needed more camera angles. I moved the camera and used the Generate PYR relative to POS Wizard in CoH Demo Editor to focus the camera on what I wanted. The only significant difference between the 3 demo files is the CAM POS and PYR lines. You can take a look at them if you like Close-up on Private Heck and Close-up on Heroes.
The rest was just using Windows Media Encoder to capture each demo and then Windows Movie Maker to cut and put it together. You can watch the finished product here or on YouTube . The direct file is much better.


The author of this post is speaking in generalities from his personal experience.
Your experience may vary.