Badge time.png   The Paragon Wiki Archive documents the state of City of Heroes/Villains as it existed on December 1, 2012.

Difference between revisions of "User:Scuzzbopper/Demo Editing"

From Paragon Wiki Archive
Jump to: navigation, search
m
m (Replacing page with 'Moved Live: Demo Editing Genuinely just for notes now.')
 
(80 intermediate revisions by the same user not shown)
Line 1: Line 1:
Pulling together some [[Demo Editing]] notes here.
+
Moved Live:  [[Demo Editing]]
  
== Overview ==
+
Genuinely just for notes now.
 
+
'''Demo Editing''' is a term used to describe the modifying of a CoH demo file.  Typically, the modified demo file is then used to produce user-generated screenshots or movies (machinima) of events and situations which did not actually take place during live game play.  A recorded demo is saved as text file, rather than a standard video file, containing all the commands required to instruct the game engine how to play back the recorded demo.  All of this information can edited, changed, deleted, or added to (or even created from scratch); requiring, at its simplest, only a text editor and a reasonable understanding of the demo information/code.  This allows for the creation of custom screenshots and movies via '''Demo Editing''' with relative ease.
+
 
+
See the [[Demo Recording]] entry for information on how to record and play back a demo.
+
+
<span style="color:orange;"> Insert a Sample Demo-Edited Screenshot Here.  How about "Victory At Last"?</span>
+
 
+
 
+
== Demo Code ==
+
 
+
<span style="color:orange;">Some intro text on "Code" here.</span>
+
 
+
 
+
=== Time Increment (Advancing Demo Play) ===
+
 
+
The '''Time Increment''' is the information that tells the demo how to advance the play of the recording.  Each line of demo code begins with a number that tells the game engine how much time to advance the demo playback since the previous line, hence this number is referred to as the '''Time Increment''' (among other terms).
+
Looked at as a whole, rather than line by line, a demo file is formatted in such a way that it is organized into columns.  The first column is always the '''Time Increment'''.
+
 
+
The '''Time Increment''' is always a positive value integer and specifies the time in milliseconds (thousandths of a second) that the game engine waits, after the previous line of demo code, before executing the next line.  So a value of 2000 at the beginning of a line of demo code would mean that the 2 seconds of "real" time would pass, after the previous line of code, before the demo playback carries out that commands on that line.
+
 
+
<span style="color:orange;">Show Demo File Snippet Sample Here with Commentary</span>
+
 
+
Please note that this value, while it controls the advancement of the demo playback, does '''not''' control the time of day in a demo.  The time of day in a demo is fixed by the '''Time''' command, and, once specified, remains fixed throughout the demo playback and does not change.
+
 
+
The '''Time Increment''' is required for every line in a demo, and must begin each line, even if the '''Time Increment''' is just zero.
+
 
+
 
+
=== Entity ID Number ===
+
 
+
After the '''Time Increment''', most lines of demo code (but not all) will have a second positive value integer.  Where this occurs, this second number is the '''Entity ID Number'''.  The value is the unique numerical ID number associated with every ''Entity'' recorded in the demo.  ''Entity'' refers to any model, object, mission objective, NPC, or player character in the demo.  Each such element must have a unique numerical ID associated with it, as specified by the '''Entity ID Number'''.  Any line of code associated in any way with an ''Entity'' (which is nearly, but not quite, every line), must have an '''Entity ID Number''' as the second element in that line.
+
 
+
<span style="color:orange;">Show Demo File Snippet Sample Here with Commentary</span>
+
 
+
Looked at in terms of a column format, the second column in a demo file is usually the '''Entity ID Number''', however, not every line requires an '''Entity ID Number'''.  Wherever the second column is a number, then that is an '''Entity ID Number'''.  Lines that do not require an '''Entity ID Number''' will have a text command beginning in the second column.  Examples of demo commands which do not require an '''Entity ID Number''' for their line are '''SKYFILE''', '''CAM POS''', '''CAM PYR''', and '''DYNARRAY'''.
+
 
+
The '''Entity ID Number''' is a unique value associated with a specific ''Entity''.  The '''Entity ID Number''' of each line tells the game engine which ''Entity'' to apply/attach that line of demo code to.  For example, if a line of demo code includes an animation ('''MOV'''), the '''Entity ID Number''' tells the game engine which ''Entity'' to have perform that animation in the demo playback. 
+
 
+
<span style="color:orange;">Show Demo File Snippet Sample Here with Commentary</span>
+
 
+
 
+
=== Version ===
+
 
+
Does this even do anything?
+
 
+
=== Map ===
+
 
+
Map file name.  Straightforward.
+
 
+
=== Time ===
+
 
+
Time of day.  Decmilized military convention.  0.0 = Midnight.  12.0 = High Noon.
+
 
+
Note that, unlike in-game, the time of day does '''NOT''' advance in demo playback (unless that's changed recently and I missed it), so whatever the time is in the demo code is what the time of day will be for the entire demo playback.
+
 
+
=== SKYFILE ===
+
 
+
Controls invasion sky color.  Binary control for first two fields.  Third field unknown, but lets you do some wonky color/depth-of-field stuff if you crank up the value.  Haven't tried negative values.  Should do that.
+
 
+
Also frequently used as a generic time (demo play) advancer (advancing time index of first column number).
+
 
+
=== DYNARRAY ===
+
 
+
Controls war walls up down.  Also controls other "dynamic" effects, like the Recluse's Victory "war boards" in Atlas and Grandville, the appearance of Recluse's Victory itself (I think, verify), etc.
+
 
+
Only appears for maps/demo recordings that need it, so may not appear in all demo file code.
+
 
+
Bases have some dynamic library code too, but I think that's different (check that).
+
 
+
=== POS ===
+
 
+
Position.  Map coordinates.  Where the object/model/whatever in question appears.  Keys to the required unique ID that all entities have (second column).  In X,Z,Y code ('''NOT''' X,Y,Z).  (No commas.)
+
 
+
=== PYR ===
+
 
+
Pitch-Yaw-Roll.  Most of POS comments apply.  Spacial orientation of object/entity.  Expressed in terms of -pi to +pi.  This is what determines if Ms. Liberty is standing on her feet or standing on her head.  Make graphics for this one showing various orientations and to give scale of -pi/+pi.
+
 
+
Give a link to [http://en.wikipedia.org/wiki/Radians Radians].
+
 
+
=== CAM POS ===
+
 
+
POS of the camera.  Same as POS, but the camera gets it's own unique command to identify the POS for your camera's POV.
+
 
+
=== CAM PYR ===
+
 
+
Ditto as for CAM POS, except for PYR.  All PYR stuff applies.
+
 
+
=== SEQ ===
+
 
+
Non-desctructible objects.  Stands for "Sequence"?  These are all the non-destructible (ones you can't smash) mission objectives (and a few other mission-objective-type-thingies, like the ore convertor in Bloody Bay or the key stations and missile launch terminal in Warburg).  They are classed as "SEQ" instead of "NPC".  Don't know why.  Maybe something to do with them being clickies and needing to specify them as clickable.
+
 
+
'''They do not appear in demo playback.  Don't show up.  Invisible.'''
+
 
+
They are also distinct code entities from regular models with their own code (so you can't just replace '''SEQ''' with '''NPC''' to make them show up).
+
 
+
Any mission objectives that you can smash are regular old '''NPC'''-classified models.
+
 
+
=== Model/Object Code ===
+
 
+
==== New ====
+
 
+
Tells you that you are adding a new entity.  The second number column (ID) attached to this command is when and where the unique ID for the entity is first specified.  This is the line where you also give it a name (after the '''New''').  Names need quotations if they are more than one word.  If it's just one word, then the names don't need quotes.
+
 
+
==== NPC ====
+
 
+
Tells you that it is an NPC and then you specify the model code for the NPC.  Don't forget the ID (required).
+
 
+
==== POS ====
+
 
+
Talked about above.  You need to give this command for every NPC, with it's appropriate ID.
+
 
+
==== PYR ====
+
 
+
Talked about above.  You need to give this command for every NPC, with it's appropriate ID.
+
 
+
==== MOV ====
+
 
+
The animation the NPC entity is performing.  Thousands to choose from.  ID required.  Specify the name of the animation after '''MOV'''.
+
 
+
==== HP ====
+
 
+
The '''CURRENT''' Health (Hit Points) of the NPC entity.  Not always required.  If it's a destructible object (object here meaning like a truck, or cardboard box, or whatever; not a person-type thingie), then you will need this to make things show up right (along with the next line).  ID required.  Will change throughout the demo if the entity is getting beat on.
+
 
+
Harmless to add this (always paired with HPMAX) if you aren't sure if it's needed or not.
+
 
+
==== HPMAX ====
+
 
+
The Maximum Health of the NPC entity.  Not always required (see notes for HP above and the destructible object comments below).  ID required (like always).  The relative proportion of the two determines the appearance of destructible objects.
+
 
+
=== FX Code ===
+
 
+
Here we talk about "Effect" (FX) -- powers and explosions and laser beams and all that zappy zowwy freem stuff.
+
 
+
==== FX ====
+
 
+
Tells you what the FX is.  Here's a sample:
+
 
+
0  3  FX Maintained 4 POWERS/KINETICS/KINSPEEDCONTINUING.FX 0
+
 
+
* First number = time index
+
* Second number = unique ID of the entity that "owns" this FX
+
* '''FX''' code = "Hi, I'm an FX."
+
* After '''FX''' ("Maintained," here) = Duration Type of FX, either ''Maintained'' (ongoing) or '''OneShot'' (goes "bam" and it's gone).  Usually FXs are one or the other, but some Maintained/OneShot FX are the same (and just loop the OneShot or whatever if they're Maintained.
+
* Next number is the unique ID of the FX.  Not the unique ID of the entity shooting the FX off or afflicted by it, but a new/different unique ID just for the FX itself.
+
* Then the code for the particular FX.
+
* Then a zero, that I think is just an end-of-line type thingie (need to check).
+
 
+
==== FXSCALE ====
+
 
+
Just put in "FXSCALE 10.000000 10".  I forget what messing with this does, if anything.
+
 
+
==== ORIGIN ====
+
 
+
Who is shooting this FX off.  Where the FX is coming from.  When you've got an FX in play, you need to specify who's catching and who's pitching.  Need to do both even if it's a self-only power and you're doing '''both''' the pitching ''and'' the catching.
+
 
+
0  3  ORIGIN ENT 0 0
+
 
+
If it's a self-only power, both numbers after ENT ("Entity" I figure) are 0.  If it's a beam thing and needs at origin point, then the number after ENT is the unique ID of the shooter (pitcher).
+
 
+
'''I ''THINK''.  Need to double-check.  Haven't played with FX in a while.  Need to review ORIGIN/TARGET.  Probably got something wrong in here since I'm going just by memory.  Last number always zero for both of these?'''
+
 
+
==== TARGET ====
+
 
+
Who's on the receiving end of the FX.
+
 
+
0  3  TARGET ENT 3 0
+
 
+
First number after '''ENT''' is the unique ID of the entity getting hit by the FX.
+
 
+
Can also be
+
 
+
TARGET POS X Z Y
+
 
+
For Targeted AoE powers ("shoot at the ground" powers).
+
 
+
=== Player Character Code ===
+
 
+
Blah blah blah.  May leave this section for someone else.
+
 
+
==== COSTUME ====
+
 
+
==== PARTSNAME ====
+
 
+
==== XLU ====
+
 
+
== Basic Model Substitution ==
+
 
+
== Default Camera POV ==
+
 
+
Or maybe this as a subset of some sort of section on Camera Manipulation?
+
 
+
== Transparency (Stealth) ==
+
 
+
Most stealth/invisibility/transparency effects don't play back in demos. The few exceptions (like trainer War Witch and Numina) are built into the model and not something you can apply.
+
 
+
However, although the standard stealth powers don't work, this FX does:
+
 
+
OBJECTIVEOBJECTFX/GHOSTED.FX
+
 
+
This is the placeable mission objective effect (like for planting bombs) that make the objects transparent until you place them. I did a quick demo test as follows (splicing States onto the City Rep):
+
 
+
0 6 NEW "City Representative"
+
 
+
0 6 NPC Model_Statesman
+
 
+
0 6 POS 128.5 -768 -639.5
+
 
+
0 6 PYR 0 0 0
+
 
+
0 6 MOV ALTREADY_TRANS_XARMS
+
 
+
0 6 FX Maintained 7 OBJECTIVEOBJECTFX/GHOSTED.FX 0
+
 
+
 
+
The FX line is the only one I added (make sure it doesn't conflict with any other FX) and voila! Transparent Statesman.
+
 
+
Qualifiers:
+
 
+
* The transparency effect pulsates, so it's not a consistent steady level of transparency.
+
* The FX also includes the mission objective noise, so you might have to work with the audio.
+
 
+
 
+
== Invasion Sky & War Walls ==
+
 
+
Normal sky: SKYFILE SKY 1 0 1.000000
+
Invasion sky: SKYFILE SKY 0 1 1.000000
+
 
+
That's using the first two fields (which is how it records during an actual invasion), which appear to be binary.
+
 
+
You can also play with the final number to tweak things, though I don't know how that functions. My best guess being that it's a saturation value of some sort -- the more you increase it, the more color starts washing out all detail, although interestingly it seems to predominate in the foreground, rather than the sky or distance. Possibly a depth of field value. Dunno.
+
 
+
 
+
== Walking ==
+
 
+
How to make player characters walk here.
+
 
+
== Destructible Objects ==
+
 
+
Object-based NPCs that are classed as "destructible" have a variable appearance based on their hit points, sometimes as simple as destroyed/not-destroyed, sometimes with multiple different appearances including partly-damaged states.
+
 
+
To make these work in demos, you have to assign hit points to the models. If you don't do that, then the game assumes the hit points are zero and treats the model as "destroyed", which usually, but not always, means that it's just gone.
+
 
+
So when you're splicing these into the demo code, include hit points for them like so:
+
 
+
:0 23 NPC v_destcldrn_cauldron
+
:0 23 MOV READY
+
:0 23 HP 150.00
+
:0 23 HPMAX 150.00
+
 
+
Setting the HP equal to HPMAX will give you the default, undestroyed appearance, and hopefully that should make them appear for you. If you want to see if there are transitional appearances, you can try setting HP to half of HPMAX, and so forth. Not all have transitional appearances, but some do. The Clockwork Paladin construction comes to mind as an object with multiple different transitional appearances depending on HP. This is also how the Rikti A Bomb warning lights color is controlled.
+
 
+
Not all object models are destructible, but seeing "dest" anywhere in the object name is generally a guarantee that it is one of these. But there are also destructible models that don't have "dest" in the name. If in doubt, add HP & HPMAX (at 100% HP) to the model code.
+
 
+
 
+
== Fixing "Player" FX ==
+
 
+
What it looks like is happening is that many FXs are not working if they are attached to the Player (meaning the character flagged as the Player in the demo). I pasted in some other NPCs and players (not as the "Player") and they appeared to work fine.
+
 
+
I suspect that this may have been something that crept in with I11, because some of the Maintained FXs that I was able to get to work are the Willpower FX, but older power set FXs didn't work for me (just based on 1 or 2 that I tried quickly). I also tried inserting the moneybag FX into some of my own demos and had the same problem with it not appearing on my "Player".
+
 
+
So, although you're doing everything right, it appears to be an issue with demos that isn't working. As I said, it appears to only be the one character flagged as the "Player" that is the problem. Other players and NPCs look like they work OK, so here's a quick fix. What you can do to get by this issue is create an invisible model attached to the "Player" flag and turn your character into just a regular player. You can do this by making the following code into the beginning of your demo:
+
 
+
:1 0 Version 2
+
:0 0 Map maps/City_Zones/Trial_06_01/Trial_06_01.txt
+
:0 0 Time 21.028650
+
:0 CAM POS 1818.146851 -318.060516 9450.268555
+
:0 CAM PYR -0.346 1.370835 0
+
:0 50 Player
+
:0 50 NEW "Invisible Placeholder"
+
:0 50 NPC Puddle
+
:0 50 POS 1803.004883 -319.173309 9443.212891
+
:0 50 PYR 0 3.11 0
+
:0 50 MOV READY
+
:0 1 NEW " "
+
:0 1 COSTUME 1 ffffff -3.297710 -1.000000 -0.015873 -1.000000 -0.523810 -0.777778 -0.682540 -0.047619 -0.015873 -0.428571 0.714286 -0.015873 -0.492063 0.015873 -0.650794 -0.460317 -0.523810 0.428571 -1.000000 0.396825 -0.142857 -0.301587 0.682540 0.015873 -0.746032 -1.000000 1.000000 -0.492063 0.460317 0.365079
+
:0 1 PARTSNAME shorts skin_tights bikini_3 000000 000055
+
 
+
...the end there being the rest of your character's costume as normal. Puddle is an invisible model, so by inserting that as the "Player" it gets you past this bug (I also changed your character's name field to <0 1 NEW " ">, otherwise, as you are no longer the "Player", the character's name would appear above your head).
+
 
+
 
+
== Internal Links ==
+
 
+
[[Demo Recording]]
+
 
+
 
+
== External Links ==
+
 
+
=== Guides ===
+
 
+
* [http://boards.cityofheroes.com/showflat.php?Cat=&Board=faq&Number=1838565 Custom Demo Creation Guide] (12/04/04) by MasterMarbles
+
* [http://boards.cityofheroes.com/showflat.php?Cat=&Board=faq&Number=851259 Demo File Format FAQ] (07/07/04) by Zloth
+
* [http://files.filefront.com/StormknightsVideoGuide+1+0pdf/;9888227;/fileinfo.html Storm Knight's Video Guide] (08/07/04) by Storm_Knight
+
* [http://boards.cityofheroes.com/showflat.php?Cat=&Board=faq&Number=1874789 Screenshot and Demo Guide v2] (12/09/04) by Zloth
+
* [http://boards.cityofheroes.com/showflat.php?Cat=&Board=faq&Number=1939763 A Kitty's guide to making CoH movies!] (12/21/04) by IttiBittiKitty
+
* [http://boards.cityofheroes.com/showflat.php?Cat=&Number=3322019 Demo Editing and Videos - The end-to-end guide] (07/20/05) by Majik
+
* [http://boards.cityofheroes.com/showflat.php?Cat=0&Board=faq&Number=5659797 Paris' Demo Guide] (06/01/06) by Paris
+
* [http://boards.cityofheroes.com/showflat.php?Cat=0&Board=faq&Number=6017752 DEMO File Format: Addendum (character parts)] (07/16/06) by Djeannie
+
* [http://boards.cityofheroes.com/showflat.php?Cat=0&Number=10177900&an=0&page=0#Film Toons on Film City Scoop article] (02/08/08) by Dark_Respite
+
* [http://boards.cityofheroes.com/showflat.php?Cat=0&Number=10262307 Demo Edit Tutorial: Jumping on a moving truck] (02/21/08) by Balshor
+
 
+
=== Tools & Applications ===
+
 
+
* [http://home.kc.rr.com/dasloth/CoH/Demos/DemoEdit.htm CoH Demo Editor] by Zloth
+
* [http://files.filefront.com/CoH+demo+editor/;9888228;/fileinfo.html CoH demo editor] by Storm_Knight
+
* [http://home.earthlink.net/~balshor/DemoEditorInstaller.exe Balshor's Demo Editor] by Balshor
+

Latest revision as of 00:24, 11 June 2008

Moved Live: Demo Editing

Genuinely just for notes now.