Demo Recording: Difference between revisions

From Unofficial Homecoming Wiki
Jump to navigation Jump to search
imported>Konoko
(+semi complete list of demo related commands and switches)
No edit summary
 
(70 intermediate revisions by 17 users not shown)
Line 1: Line 1:
{{wip}}
{{TOCright}}
== Overview ==
== Overview ==


A demo in City of Heroes is an in-game recording made via the /demorecord [[Slash Command]]. The demo feature allows you to make recordings of your gameplay and use the game engine to play back those recordings. The recordings created this way are '''not actual video documents''', but simply '''text files''' <!-- Need emphasis on video vs text, but maybe not --> with a record of all the commands, models, effects, and animations that tell the game engine how to render the recorded demos. Because the demo files are just text files, demo recordings can be edited with any text editor, or with player-made tools specifically designed to manipulate demo files.  This gives you the ability to modify demo recordings (or even create them from scratch) to make custom "movies" for playback via the game engine, allowing situations and events which may not exist during actual play. The demo playback can then be captured with a video capture tool <!-- What about -demodump that creates hundreds (or thousands) of JPG's? --> and then further edit and customize your film, and to share it with others.
A demo in City of Heroes is an in-game recording made via the {{slashcommand|demorecord}} [[Slash Command]]. The demo feature allows you to make recordings of your gameplay and use the game engine to play back those recordings. The recordings created this way are '''not actual video documents''', but simply '''text files''' <!-- Need emphasis on video vs text, but maybe not --> with a record of all the commands, models, effects, and animations that tell the game engine how to render the recorded demos. Because the demo files are just text files, demo recordings can be edited with any text editor, or with player-made tools specifically designed to manipulate demo files.  This gives you the ability to modify demo recordings (or even create them from scratch) to make custom "movies" for playback via the game engine, allowing situations and events which may not exist during actual play. The demo playback can then be captured with a video capture tool <!-- What about -demodump that creates hundreds (or thousands) of JPG's? : Yeah, that too.  I think the demo-to-movie process and Demo Editing is a whole topic in and of itself and big enough and then some for its own page. Aiming for a general overview here. --> and then further edited to customize your film, and to share it with others.


== How To Record A Demo ==
== How To Record A Demo ==
Line 10: Line 10:
  {{slashcommand|demorecord|"demo_name"}}
  {{slashcommand|demorecord|"demo_name"}}


Where "demo name" is the name of the file you wish to save the demo name as.  Do not use quotation marks in the actual name.  The demo name should be all one word and should not contain any punctuation (hyphens and underscores are acceptable, spaces should be avoided).  For example:
Where "demo_name" is the name of the file you wish to save the demo name as.  Do not use quotation marks in the actual name.  The demo name should be all one word and should not contain any punctuation (hyphens and underscores are acceptable, spaces should be avoided).  For example:


  /demorecord coolinvasiondemo1
  {{slashcommand|demorecord|coolinvasiondemo1}}


To stop the demo recording, type the following on the chat command line:
To stop the demo recording, type the following on the chat command line:
Line 18: Line 18:
  {{slashcommand|demostop}}
  {{slashcommand|demostop}}


Please note that the demo will also automatically cease recording if you zone, such as when exiting a mission.  If you have recorded a very large demo (either lengthy or one featuring a lot of in-game activity), the game may pause very briefly when issuing the /demostop command.  It may therefore be advisable to wait until ''after'' the big boss fight to stop your demo recording.
Please note that the demo will also automatically cease recording if you zone, such as when exiting a mission.  If you have recorded a very large demo (either lengthy or one featuring a lot of in-game activity), the game may pause very briefly when issuing the {{slashcommand|demostop}} command.  It may therefore be advisable to wait until ''after'' the big boss fight to stop your demo recording.


The recorded demo will be saved to your City of Heroes directory in the "client_demos" folder.  The demo recording file will have a suffix of "cohdemo".  In the example used above, the "coolinvasiondemo1" file would be found as follows:
The recorded demo will be saved to your City of Heroes directory in the "client_demos" folder.  The demo recording file will have a suffix of "cohdemo".  In the example used above, the "coolinvasiondemo1" file would be found as follows:
Line 32: Line 32:
To play back a specific recorded demo via a Windows shortcut, use the following steps:
To play back a specific recorded demo via a Windows shortcut, use the following steps:


* Locate your City of Heroes directory and make a shortcut to '''''cityofheroes.exe''''' on your desktop (or wherever you prefer).
* Locate your City of Heroes directory and make a shortcut to '''''cityofheroes.exe''''' on your desktop (or wherever you prefer). Typically, CityOfHeroes.exe is located in the "Homecoming\bin\win32\live" or "Homecoming\bin\win64\live" folder.
* Right click on the shortcut and select '''Properties'''.
* Right click on the shortcut and select '''Properties'''.
* Within the Target box you will see the command line: '''"C:\Program Files\City of Heroes\CityOfHeroes.exe"''' (the directory path may be different if you did not install City of Heroes in the default directory).
* Within the Target box you will see the command line: '''"C:\Program Files\City of Heroes\CityOfHeroes.exe"''' (the directory path may be different if you did not install City of Heroes in the default directory).
* At the end of this line, add a space, followed by '''''-demoplay your_demo_name''''' (where ''your_demo_name'' is the name you gave the demo).
*If you are using Tequila:
* For example: '''"C:\Program Files\City of Heroes\CityOfHeroes.exe -demoplay coolinvasiondemo1"''
** At the end of this line, add a space, followed by '''''-legacylayout -assetpath piggs -assetpath homecoming -demoplay your_demo_name''''' (where ''your_demo_name'' is the name you gave the demo). 
*If you are using the HCLauncher:
** At the end of this line, add a space, followed by '''''-assetpath assets/issue24;assets/live -profile live -demoplay your_demo_name''''' (where ''your_demo_name'' is the name you gave the demo).
* For example: '''"C:\Program Files\City of Heroes\CityOfHeroes.exe" -legacylayout -assetpath piggs -assetpath homecoming -demoplay coolinvasiondemo1''' <!-- You can also just issue this command right at a DOS prompt and skip the shortcut, but don't know if that's worth mentioning -->
* Exit '''Properties'''.
* Exit '''Properties'''.
* Double-click the shortcut you just created.  This should launch the game client into demo playback mode and play the demo you specified.
* Double-click the shortcut you just created.  This should launch the game client into demo playback mode and play the demo you specified.


Note that when playing back a demo via this method, the demo you specify in the shortcut properties must be in your ''client_demos'' folder.
Note that when playing back a demo via this method, the demo you specify in the shortcut properties must be in your ''client_demos'' folder.
==== Method 2 ====
==== Method 2 ====
Similar to above, however if you leave off the ''your_demo_name'' in your shortcut, you can drag and drop any *.cohdemo file onto it and Windows will tack that file onto the shortcut.
Similar to above, however if you leave off the ''your_demo_name'' in your shortcut, you can drag and drop any *.cohdemo file onto it and that particular demo will play without need to specify the file name in the shortcut. However, it is imperative that -demoplay is the last parameter if more are provided.


=== Playback Via A Demo Launcher ===


For greater flexibility, you may use a demo launcher application (see the next section) or if you plan to play back many different demos, you may omit the demo name from the shortcut target, and then just drag and drop the demo you wish to play onto the shortcut.
An alternative to playing back a demo via a shortcut to the game client is to use an application specifically designed to play back a demo (the application still does this via the game client but handles all of the operations required for demo playback automatically).  Many people find this less cumbersome than launching via a modified shortcut or other method.  Another advantage of using a demo launcher is that is may also perform automatic functions to "fix" certain aspects of demo playback if there are known playback issues resulting from playing the demo directly.


=== Playback Via A Demo Launcher ===
* Probably the most popular demo launcher is [http://web.archive.org/web/20081211140044/http://home.roadrunner.com/~dasloth/CoH/Demos/DemoLaunch.htm Zloth's CoH Demo Launcher] program.
* You can also try @Michiyo's [https://cityofheroes.dev/demoplayer/DemoLauncher.exe | DemoLauncher app].


An alternative to playing back a demo via a shortcut to the game client is to use an application specifically designed to play back a demo (the application still does this via the game client but handles all of the operations required for demo playback automatically).  Many people find this less cumbersome than launching via a modified shortcut or other method.  Another advantage of using a demo launcher is that is may also perform automatic functions to "fix" certain aspects of demo playback if there are known playback issues resulting from playing the demo directly.
=== Stopping Playback ===


Probably the most popular demo launcher is [http://home.kc.rr.com/dasloth/CoH/Demos/DemoLaunch.htm Zloth's CoH Demo Launcher] program.
Just hit the ESC key. The game will pop up a message box asking if you really want to quit. Unfortunately, under Windows Vista and Windows 7, this popup will often appear behind the game!  Just alt-tab to it and select Yes to quit.


== Uses For Demos ==
== Uses For Demos ==


=== Recording Game Play ===
=== Recording Game Play ===
The most straightforward use for demo recordings is to capture some segment of game play for later viewing, sharing, or editing.  Alternatively, there are stand-alone video capture applications (such as [http://fraps.com/ FRAPS], for example) that can directly record graphics displayed on your screen to a video file as another means of recording game play.  There are both advantages and disadvantages to using the {{slashcommand|demorecord}} function over other methods of recording game play.


=== Capturing Screenshots ===
=== Capturing Screenshots ===


=== Creating Custom Videos ===
Demos can also be useful for capturing [[Screenshots]].  If you have a particular screenshot in mind that requires specific timing, it can often be difficult to capture that specific moment during actual play.  Particularly if you are rather busy trying to stay alive at the opportune moment.  Demos have some answers to this problem.
 
[[File:Dead Drone2.jpg|thumb|200px|right|Precision timing made possible by -demodump]]
The most straightforward way to do this is to play back the demo and take screenshots.  Your screenshot key won't work <!-- maybe it will in windowed mode? --> but you can bring down the console (see below) and type in "screenshot" to take the shot.  If you miss on the timing, simply replay the demo and try again.
 
Demo functions also include options to export the playback of a demo to a series of image files - one file for each frame displayed, as well as the option to adjust the speed of the demo by specifying the frames per second (FPS) of the playback.  Between these two options, you can generate very precisely timed [[screenshots]].  The disadvantage of this is that exporting the playback of the demo to a series of image files can use a significant amount of disk space.


== List ==<!-- need better name -->
To use the image dump method, you'll need to turn on the -demodump option and set the -demofps to a number.  (If you are using Zloth's Demo Launcher, select the Demo Dump option then set the "Speed (FPS)" number.)  The higher you set the FPS, the more screenshots you will get. For instance, if you set the FPS to 7, you will get 7 screenshots for every second your demo plays back.  When the demo is done, you simply go into the client_demos\screens directory and pick out your favorite screenshot(s) and delete the rest.
* /demorecord demo_name
 
[[File:Freaky DE.jpg|left|200px|thumb|Terra in a Freakshow disguise??  No, the power of demo edits at work!]]
If your demo is huge, you might not have room on your hard drive for all the images that would be generated.  The demo console comes in handy for this.  Start your demo up with the FPS number you want and let it play until you start getting close to the area where you want screenshots saved.  When you're ready, type the tilde (~) key on your keyboard and a command prompt will be shown.  Enter "demodump 1" (without the quote marks) and the game will start saving screenshots.  Type the tilde key again to get rid of the conosole.  Let the demo play through the part you want to save.  After that you can either quit the demo completely or do the tilde again and enter "demodump 0" to stop the screenshots from saving.  Unfortunately, the -disable2D option will make it impossible to see the command console.  The console still works but, without being able to see what you type or even if the console is open or closed, it's tricky to use.
 
The ability to edit and customize demos gives you the capability to produce [[screenshots]] of situations or events than can not be produced during actual play.  You can replace players with NPCs like [[Ghost Widow]] or [[Statesman]], change a player's costume or alter their sliders to make them taller or shorter, remove powers you don't want in your screenshot (like the glowing hands effect that comes with Hasten), give the enemies special powers (like the Freakshow disguise on the left), or even remove players or NPCs entirely!
 
For a further example of what can be accomplished with screenshots of customized demos, see the [ftp://ftp.cityofheroes.com/comics/i12comic-final.pdf Guide to Issue 12: The Midnight Hour comic book] on the [http://web.archive.org/web/20121014173246/http://na.cityofheroes.com/en/media-and-downloads/comic-archive/ City of Heroes Comic Book web page].
 
Please note that the game user interface (UI) is not displayed during demo playback.  If you require a screenshot that shows your chat windows, health/stamina bars, your enhancement screen, or other parts of the UI, this can not be captured from a demo.
 
=== Creating Custom Movies ===
 
Perhaps the most interesting application is using demos to create custom movies, or [http://en.wikipedia.org/wiki/Machinima Machinima], using the City of Heroes game engine. 
 
As mentioned, a recorded demo is saved as text file, rather than a standard video file.  This text file contains all the commands required to instruct the game engine how to play back the recorded demo.  This includes such information as what character models to display, special effects, character animations, character and object locations and orientations, character movements, camera angles and movements, and more.  All of this information can edited, changed, deleted, or added to, and requires only a text editor (and a reasonable understanding of the appropriate demo information) to do so.  This process is often referred to by players as [[Demo Editing]]. 
 
An edited demo can then be converted to a standard video format (AVI, MPG, WMV, Quicktime, etc.).  This can be done using a video capture tool such as [http://fraps.com/ FRAPS] or by using demo playback options to export each frame of a demo to an image file (which could then be further manipulated if desired) and then converting that series of image files into a video.  Once captured into a standard video format, video edit tools such as Windows Movie Maker can then be used to further customize the captured video with such additions as titles, scene transitions, voice-overs, and so forth.
 
Overall [[Demo Editing]] is a powerful tool for being able to create highly original movies using the City of Heroes game engine.  To best understand what can be accomplished by editing demos, it may be useful to view some examples of movies created by this process.  The following are just a few examples of many excellent and creative player-made movies created with [[Demo Editing]]:
 
* [http://maximilia.net/Thankyou.wmv CoH Thank You] at [http://maximilia.net/ Maximilia.net] (also a lo-res copy of [http://www.youtube.com/watch?v=1kzVZ97cSnI CoH Thank You] at [http://www.youtube.com/ YouTube])
* [http://www.youtube.com/watch?v=PGF0MYORADE The Dance Gun] at [http://www.youtube.com/ YouTube]
* [http://web.archive.org/web/20070205060500/http://wiki.trimmertools.com/index.php/Sabotage The Operatives - Sabotage]
* [http://web.archive.org/web/20070205060425/http://wiki.trimmertools.com/index.php/Crash_Landing The Operatives - Crash Landing]
* [http://www.youtube.com/watch?v=bGrp_InCVNY The Operatives - In The End] at [http://www.youtube.com/ YouTube]
* [http://verticalstudio.blogspot.com/ Vertical Studio] featuring Night Prayers, Princess of Dusk, and Dies Irae videos
* [http://web.archive.org/web/20080115141343/http://homepage.mac.com/rhmoon/Movies/movies.html MoonHill Productions] [https://www.youtube.com/watch?v=D7xQUlQ-iys| Your Superpowers and You]
* [https://www.youtube.com/samuraiko Samuraiko Productions]
* [http://web.archive.org/web/20081211122659/http://www.vitaerising.com/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=591&page=1 Hype Zero], [http://web.archive.org/web/20081211122734/http://www.vitaerising.com/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=592&page=1 Hype Won], and [http://web.archive.org/web/20081211122740/http://www.vitaerising.com/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=593&page=1 Hype Too] at [http://web.archive.org/web/20090503095053/http://www.vitaerising.com/modules.php?op=modload&name=Sections&file=index&req=listarticles&secid=5 Vitae Rising] (also lo-res copies of [http://www.youtube.com/watch?v=9wkr31uTI1Q Hype Zero] and [http://www.youtube.com/watch?v=3BzyPgDQ1Tk Hype Won] at [http://www.youtube.com/ YouTube])
 
=== Measuring Frames per Second ===
 
The /showfps [[Slash Command]] is nice as far as it goes but can't provide repeatable results.  Demos can provide a much better solution to people who want to compare frame rates in the exact same situations.  For instance, you may want to know if overclocking your CPU does anything other than void your warranty.  You can record a demo, play it back using the -demostats and -demoloop commands, record the results, overclock your CPU, then play back the same demo with the same commands and compare just how much faster your computer is.
 
== Limitations of Demos ==
 
Demos are not a perfect recording of the game and have a number of limitations/bugs.[[File:Crazed Sliders.jpg|thumb|200px|right|An example of the arm-slider problem]]
 
* You must have the game to see the demo!  If you email your demo to a friend that doesn't have CoH, your friend will have to download the entire game to see your demo.
* Demos are played back by your current version of the game, not the game 'as it was then.'  So, if you took a demo on the north side of Talos Island back when the game first came out, you may find that the Arena has been put right on top of you when you play back a demo now.  (On the plus side, if you've gotten a new computer since the demo was recorded, you can now watch the action with higher graphics settings!)
<!-- * As of Issue 9 and 10, demos will not display graphic effects on your player correctly without an alteration to your registry settings. Zloth: FIXED IN A PATCH JUST AFTER ISSUE 10 -->
* Ragdoll physics look a little odd at times (but far better after Issue 12)
* Timing can sometimes be off.  For instance, if your player runs forward, you might see your character start moving forward before the character starts running.
* Mission objectives (glowies) often do not appear in demos.
* Players and NPCs that try to turn invisible stay visible.
* Kheldians that shapechange will often stay stuck in the new shape when the demo is played back.
* After an enemy is defeated and has faded away, he/she/it will occasionally pop back in to the demo and just stand there.
* Sometimes demos will get a few stray commands tacked on to the end.  These can cause the demo to keep playing for several seconds (even hours, though that's very rare) after the action has stopped.
* Demos made before Issue 8 can have slider problems.  A new, invisible slider for arm length was introduced that can cause all the sliders following it in the demo description to get crazy.  End result: players have huge/tiny arms and their face is all messed up.  Very old demos made before sliders were introduced are not hurt by this problem.  <!-- Probably want to remove this some day soon, it's becoming more of a historical note now. -->
 
 
== List Of Demo Commands and Switches ==<!-- probably could use better name, still --><!-- Meh, it'll do -->
 
=== Commands Used In-Game for Recording ===
* /demorecord &lt;demo_name>
:Starts a demo recording with file name ''demo_name''.  The name must not have spaces or special characters.  If you pick a name that you've already used, your new demo will overwrite your old demo.
* /demostop
* /demostop
* -demoplay
:Stops a demo recording
* -demofps
=== Commands Used to Play Back Demos ===
* -demoplay &lt;demo_name>
:Plays client_demos\''demo_name''.cohdemo.  The demo must be in the client_demos folder or a subdirectory of that folder.  The file played back CAN have spaces in the name, too, so feel free to rename your demos to something easier to read.
* -demofps &lt;FPS>
:Renders demo at the specified frames per second (''FPS''); will not skip frames; changes the apparent speed of the demo playback
* -demodump
* -demodump
* -demosize{{red|?}}
:Saves ("dumps") all frames of demo as JPEG images to client_demos\screens\''demo_name''
* -demodumptga
:Saves ("dumps") all frames of demo as TGA images to client_demos\screens\''demo_name''
* -disable2d
:Hides all text effects (player chat, floating damage/healing text, etc.).  This also hides the console.
* -fullscreen &lt;fullscreenflag>
:''fullscreenflag'' = 0 for windowed, 1 for fullscreen
* -screen &lt;width> &lt;height>
:Set the window size or screen resolution to the specified width and height
* -demopause &lt;milliseconds>
:Stops at ''milliseconds''
<!-- -demosize{{red|?}} I don't recognize this one. Is this just the -screen command you're thinking of? yes it is--><!-- Zloth: I've never heard of the command, either. -->
* -demoloop &lt;loops>
:Causes the demo to repeat ''loops'' times before quitting
* -demoframestats 1
:When the demo completes, the game will display detailed statistics on how fast the display was being drawn. Normally used with the -demoloop command to run through the demo 3 or 4 times.
* Other [[Game Client]] commands like -renderthread will also work.
<!-- Most registry entries can also be put in as commands.  For instance, -useDOF 1 will cause your demo to display with depth of field turned on. -->
=== Console Commands ===
* ` or ~
:Use the ` (backwards apostrophe) or tilde key to turn the console command area on and off. If you have used the -disable2d command to start your demo then the console will not be visible. It will work, you just won't be able to see what you're typing.
* demodump &lt;OnOffFlag>
:Demodump 1 starts saving screenshots of each frame to your hard drive. Demodump 0 to turn it off again. This is a handy thing if you only want screenshots from a small part of a large demo. Note that the console area will appear in your screenshots until you close it.
* demodumptga &lt;OnOffFlag>
:Same thing as demodump but saves the screenshots in TGA format instead of JPG.
* cmdlist
:Displays a huge list of commands (almost none of which work).
* screenshot
:Take a screenshot
* screenshottga
:Take a screenshot in TGA format
* screenshotui &lt;OnOffFlag>
:Screenshotui 1 will cause all following screenshots to display the user interface which, in this case, is the command console. Screenshotui 0 will make it so the command console doesn't get in the way of your screenshots.
* quit
:Quits out of the demo. There is no prompt to ask you if you really want to quit, it just quits.
 
== See Also ==
[[Demo Editing]]
 
== External Links ==
<!-- * [[Game Client]] This doesn't make sense in the above list, is it supposed to be in the list below? -->
 
* [https://forums.homecomingservers.com/topic/34170-playing-old-demo-recordings-wont-work/ Forum Post with Links to new Demo Players]
 
 
{{Navbox Demo Commands}}
 
 


[[Category:Player Guides (Commands and Binds)]]
[[Category:Player Guides (Commands and Binds)]]
[[Category:Game Client]]

Latest revision as of 23:13, 25 October 2024

Overview

A demo in City of Heroes is an in-game recording made via the /demorecord Slash Command. The demo feature allows you to make recordings of your gameplay and use the game engine to play back those recordings. The recordings created this way are not actual video documents, but simply text files with a record of all the commands, models, effects, and animations that tell the game engine how to render the recorded demos. Because the demo files are just text files, demo recordings can be edited with any text editor, or with player-made tools specifically designed to manipulate demo files. This gives you the ability to modify demo recordings (or even create them from scratch) to make custom "movies" for playback via the game engine, allowing situations and events which may not exist during actual play. The demo playback can then be captured with a video capture tool and then further edited to customize your film, and to share it with others.

How To Record A Demo

To begin a demo recording, type the following on the chat command line:

/demorecord "demo_name"

Where "demo_name" is the name of the file you wish to save the demo name as. Do not use quotation marks in the actual name. The demo name should be all one word and should not contain any punctuation (hyphens and underscores are acceptable, spaces should be avoided). For example:

/demorecord coolinvasiondemo1

To stop the demo recording, type the following on the chat command line:

/demostop

Please note that the demo will also automatically cease recording if you zone, such as when exiting a mission. If you have recorded a very large demo (either lengthy or one featuring a lot of in-game activity), the game may pause very briefly when issuing the /demostop command. It may therefore be advisable to wait until after the big boss fight to stop your demo recording.

The recorded demo will be saved to your City of Heroes directory in the "client_demos" folder. The demo recording file will have a suffix of "cohdemo". In the example used above, the "coolinvasiondemo1" file would be found as follows:

\city of heroes\client_demos\coolinvasiondemo1.cohdemo

Playing Back A Demo

Recorded demos can be played back multiple ways. Two of the more common methods are either to create a shortcut to the cityofheroes.exe application and modify it to launch a demo or to use a player-made application specifically to play back demos.

Playback Via A Windows Shortcut

Method 1

To play back a specific recorded demo via a Windows shortcut, use the following steps:

  • Locate your City of Heroes directory and make a shortcut to cityofheroes.exe on your desktop (or wherever you prefer). Typically, CityOfHeroes.exe is located in the "Homecoming\bin\win32\live" or "Homecoming\bin\win64\live" folder.
  • Right click on the shortcut and select Properties.
  • Within the Target box you will see the command line: "C:\Program Files\City of Heroes\CityOfHeroes.exe" (the directory path may be different if you did not install City of Heroes in the default directory).
  • If you are using Tequila:
    • At the end of this line, add a space, followed by -legacylayout -assetpath piggs -assetpath homecoming -demoplay your_demo_name (where your_demo_name is the name you gave the demo).
  • If you are using the HCLauncher:
    • At the end of this line, add a space, followed by -assetpath assets/issue24;assets/live -profile live -demoplay your_demo_name (where your_demo_name is the name you gave the demo).
  • For example: "C:\Program Files\City of Heroes\CityOfHeroes.exe" -legacylayout -assetpath piggs -assetpath homecoming -demoplay coolinvasiondemo1
  • Exit Properties.
  • Double-click the shortcut you just created. This should launch the game client into demo playback mode and play the demo you specified.

Note that when playing back a demo via this method, the demo you specify in the shortcut properties must be in your client_demos folder.

Method 2

Similar to above, however if you leave off the your_demo_name in your shortcut, you can drag and drop any *.cohdemo file onto it and that particular demo will play without need to specify the file name in the shortcut. However, it is imperative that -demoplay is the last parameter if more are provided.

Playback Via A Demo Launcher

An alternative to playing back a demo via a shortcut to the game client is to use an application specifically designed to play back a demo (the application still does this via the game client but handles all of the operations required for demo playback automatically). Many people find this less cumbersome than launching via a modified shortcut or other method. Another advantage of using a demo launcher is that is may also perform automatic functions to "fix" certain aspects of demo playback if there are known playback issues resulting from playing the demo directly.

Stopping Playback

Just hit the ESC key. The game will pop up a message box asking if you really want to quit. Unfortunately, under Windows Vista and Windows 7, this popup will often appear behind the game! Just alt-tab to it and select Yes to quit.

Uses For Demos

Recording Game Play

The most straightforward use for demo recordings is to capture some segment of game play for later viewing, sharing, or editing. Alternatively, there are stand-alone video capture applications (such as FRAPS, for example) that can directly record graphics displayed on your screen to a video file as another means of recording game play. There are both advantages and disadvantages to using the /demorecord function over other methods of recording game play.

Capturing Screenshots

Demos can also be useful for capturing Screenshots. If you have a particular screenshot in mind that requires specific timing, it can often be difficult to capture that specific moment during actual play. Particularly if you are rather busy trying to stay alive at the opportune moment. Demos have some answers to this problem.

Precision timing made possible by -demodump

The most straightforward way to do this is to play back the demo and take screenshots. Your screenshot key won't work but you can bring down the console (see below) and type in "screenshot" to take the shot. If you miss on the timing, simply replay the demo and try again.

Demo functions also include options to export the playback of a demo to a series of image files - one file for each frame displayed, as well as the option to adjust the speed of the demo by specifying the frames per second (FPS) of the playback. Between these two options, you can generate very precisely timed screenshots. The disadvantage of this is that exporting the playback of the demo to a series of image files can use a significant amount of disk space.

To use the image dump method, you'll need to turn on the -demodump option and set the -demofps to a number. (If you are using Zloth's Demo Launcher, select the Demo Dump option then set the "Speed (FPS)" number.) The higher you set the FPS, the more screenshots you will get. For instance, if you set the FPS to 7, you will get 7 screenshots for every second your demo plays back. When the demo is done, you simply go into the client_demos\screens directory and pick out your favorite screenshot(s) and delete the rest.

Terra in a Freakshow disguise?? No, the power of demo edits at work!

If your demo is huge, you might not have room on your hard drive for all the images that would be generated. The demo console comes in handy for this. Start your demo up with the FPS number you want and let it play until you start getting close to the area where you want screenshots saved. When you're ready, type the tilde (~) key on your keyboard and a command prompt will be shown. Enter "demodump 1" (without the quote marks) and the game will start saving screenshots. Type the tilde key again to get rid of the conosole. Let the demo play through the part you want to save. After that you can either quit the demo completely or do the tilde again and enter "demodump 0" to stop the screenshots from saving. Unfortunately, the -disable2D option will make it impossible to see the command console. The console still works but, without being able to see what you type or even if the console is open or closed, it's tricky to use.

The ability to edit and customize demos gives you the capability to produce screenshots of situations or events than can not be produced during actual play. You can replace players with NPCs like Ghost Widow or Statesman, change a player's costume or alter their sliders to make them taller or shorter, remove powers you don't want in your screenshot (like the glowing hands effect that comes with Hasten), give the enemies special powers (like the Freakshow disguise on the left), or even remove players or NPCs entirely!

For a further example of what can be accomplished with screenshots of customized demos, see the Guide to Issue 12: The Midnight Hour comic book on the City of Heroes Comic Book web page.

Please note that the game user interface (UI) is not displayed during demo playback. If you require a screenshot that shows your chat windows, health/stamina bars, your enhancement screen, or other parts of the UI, this can not be captured from a demo.

Creating Custom Movies

Perhaps the most interesting application is using demos to create custom movies, or Machinima, using the City of Heroes game engine.

As mentioned, a recorded demo is saved as text file, rather than a standard video file. This text file contains all the commands required to instruct the game engine how to play back the recorded demo. This includes such information as what character models to display, special effects, character animations, character and object locations and orientations, character movements, camera angles and movements, and more. All of this information can edited, changed, deleted, or added to, and requires only a text editor (and a reasonable understanding of the appropriate demo information) to do so. This process is often referred to by players as Demo Editing.

An edited demo can then be converted to a standard video format (AVI, MPG, WMV, Quicktime, etc.). This can be done using a video capture tool such as FRAPS or by using demo playback options to export each frame of a demo to an image file (which could then be further manipulated if desired) and then converting that series of image files into a video. Once captured into a standard video format, video edit tools such as Windows Movie Maker can then be used to further customize the captured video with such additions as titles, scene transitions, voice-overs, and so forth.

Overall Demo Editing is a powerful tool for being able to create highly original movies using the City of Heroes game engine. To best understand what can be accomplished by editing demos, it may be useful to view some examples of movies created by this process. The following are just a few examples of many excellent and creative player-made movies created with Demo Editing:

Measuring Frames per Second

The /showfps Slash Command is nice as far as it goes but can't provide repeatable results. Demos can provide a much better solution to people who want to compare frame rates in the exact same situations. For instance, you may want to know if overclocking your CPU does anything other than void your warranty. You can record a demo, play it back using the -demostats and -demoloop commands, record the results, overclock your CPU, then play back the same demo with the same commands and compare just how much faster your computer is.

Limitations of Demos

Demos are not a perfect recording of the game and have a number of limitations/bugs.

An example of the arm-slider problem
  • You must have the game to see the demo! If you email your demo to a friend that doesn't have CoH, your friend will have to download the entire game to see your demo.
  • Demos are played back by your current version of the game, not the game 'as it was then.' So, if you took a demo on the north side of Talos Island back when the game first came out, you may find that the Arena has been put right on top of you when you play back a demo now. (On the plus side, if you've gotten a new computer since the demo was recorded, you can now watch the action with higher graphics settings!)
  • Ragdoll physics look a little odd at times (but far better after Issue 12)
  • Timing can sometimes be off. For instance, if your player runs forward, you might see your character start moving forward before the character starts running.
  • Mission objectives (glowies) often do not appear in demos.
  • Players and NPCs that try to turn invisible stay visible.
  • Kheldians that shapechange will often stay stuck in the new shape when the demo is played back.
  • After an enemy is defeated and has faded away, he/she/it will occasionally pop back in to the demo and just stand there.
  • Sometimes demos will get a few stray commands tacked on to the end. These can cause the demo to keep playing for several seconds (even hours, though that's very rare) after the action has stopped.
  • Demos made before Issue 8 can have slider problems. A new, invisible slider for arm length was introduced that can cause all the sliders following it in the demo description to get crazy. End result: players have huge/tiny arms and their face is all messed up. Very old demos made before sliders were introduced are not hurt by this problem.


List Of Demo Commands and Switches

Commands Used In-Game for Recording

  • /demorecord <demo_name>
Starts a demo recording with file name demo_name. The name must not have spaces or special characters. If you pick a name that you've already used, your new demo will overwrite your old demo.
  • /demostop
Stops a demo recording

Commands Used to Play Back Demos

  • -demoplay <demo_name>
Plays client_demos\demo_name.cohdemo. The demo must be in the client_demos folder or a subdirectory of that folder. The file played back CAN have spaces in the name, too, so feel free to rename your demos to something easier to read.
  • -demofps <FPS>
Renders demo at the specified frames per second (FPS); will not skip frames; changes the apparent speed of the demo playback
  • -demodump
Saves ("dumps") all frames of demo as JPEG images to client_demos\screens\demo_name
  • -demodumptga
Saves ("dumps") all frames of demo as TGA images to client_demos\screens\demo_name
  • -disable2d
Hides all text effects (player chat, floating damage/healing text, etc.). This also hides the console.
  • -fullscreen <fullscreenflag>
fullscreenflag = 0 for windowed, 1 for fullscreen
  • -screen <width> <height>
Set the window size or screen resolution to the specified width and height
  • -demopause <milliseconds>
Stops at milliseconds
  • -demoloop <loops>
Causes the demo to repeat loops times before quitting
  • -demoframestats 1
When the demo completes, the game will display detailed statistics on how fast the display was being drawn. Normally used with the -demoloop command to run through the demo 3 or 4 times.
  • Other Game Client commands like -renderthread will also work.

Console Commands

  • ` or ~
Use the ` (backwards apostrophe) or tilde key to turn the console command area on and off. If you have used the -disable2d command to start your demo then the console will not be visible. It will work, you just won't be able to see what you're typing.
  • demodump <OnOffFlag>
Demodump 1 starts saving screenshots of each frame to your hard drive. Demodump 0 to turn it off again. This is a handy thing if you only want screenshots from a small part of a large demo. Note that the console area will appear in your screenshots until you close it.
  • demodumptga <OnOffFlag>
Same thing as demodump but saves the screenshots in TGA format instead of JPG.
  • cmdlist
Displays a huge list of commands (almost none of which work).
  • screenshot
Take a screenshot
  • screenshottga
Take a screenshot in TGA format
  • screenshotui <OnOffFlag>
Screenshotui 1 will cause all following screenshots to display the user interface which, in this case, is the command console. Screenshotui 0 will make it so the command console doesn't get in the way of your screenshots.
  • quit
Quits out of the demo. There is no prompt to ask you if you really want to quit, it just quits.

See Also

Demo Editing

External Links