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 (Overview)
m (Replacing page with 'Moved Live: Demo Editing Genuinely just for notes now.')
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOCright}}
+
Moved Live:  [[Demo Editing]]
{{wip}}
+
  
Pulling together some [[Demo Editing]] notes here.  Ok, admittedly it's well beyond just "notes" at this point.  I'll start thinking about pushing it live when I get it a little further.
+
Genuinely just for notes now.
 
+
<span style="color:orange;">Too big now, eh?  Ok, I'll have to think about how best to break this up.  A main page with overview, contents, and links, and then sub-pages for the other stuff?  Kind of like the [[The Players' Guide to the Cities]]?</span>
+
 
+
= Overview =
+
 
+
'''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.
+
 
+
The term may be used to strictly refer to just the modification or creation of a custom demo file, or it can be more broadly used to refer to both the editing of a custom demo file and the playback, capture, and production of the modified demo into movies and/or screenshots.
+
 
+
See the [[Demo Recording]] entry for information on how to record and play back a demo.
+
 
+
[[Image:Victoryatlast01.jpg|500px|thumb|center|<center>"Victory At Last!"<BR/>(Example of a demo edit.)</center>]]
+
<!-- It's a little dark, especially when scaled down (meaning in terms of lighting; I'm fine with the emotional darkness); I may put together something new that's a little brighter. -SB -->
+
 
+
= Understanding Demo Code =
+
 
+
<span style="color:orange;">Some intro text here.</span>
+
 
+
<span style="color:orange;">Think I prefer "Code" over "Commands" given the Time Increment & Entity ID</span>
+
 
+
 
+
 
+
== Time Increment ==
+
 
+
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.
+
 
+
The '''SKY''' command is frequently used for lines of demo code that serve no purpose other than to advance the '''Time Increment'''.
+
 
+
== Entity ID ==
+
 
+
After the '''Time Increment''', most lines of demo code will have a second positive value integer.  A few special cases will have a text value after the '''Time Increment'''.  This second number (or text entry) is the '''Entity ID'''.  The value is the unique ID 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 ID associated with it, as specified by the '''Entity ID'''.  All lines of code must have an '''Entity ID''' as the second element in the line, usually a positive integer.  The special cases for the '''Entity ID''' are discussed below.
+
 
+
<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 the '''Entity ID'''.
+
 
+
The '''Entity ID''' is a unique value associated with a specific ''entity''.  The '''Entity ID''' 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>
+
 
+
=== Special Case Entity IDs ===
+
 
+
* '''0''': "0" (zero) is used as the entity ID value for the '''Version''', '''Map''', '''Base''', and '''Time''' commands.  This is likely used as a "null" value of the '''Entity ID''' to indicate that these commands are not associated with a particular ''entity''.
+
* '''CAM''':  The camera information recorded in the demo is identified by the text CAM in the place of the '''Entity ID''' number.  This can be viewed as a special case value of the '''Entity ID''' where it uses the text "CAM" in place of a number.
+
* '''SKYFILE''': Similar to CAM, the SKYFILE code appears in demo lines in the place normally associated with the '''Entity ID'''.  This can also be considered a special case value of the Entity ID, specific to the SKY command which always follows.
+
* '''DYNGROUPS''':  As with CAM and SKYFILE, the DYNGROUPS code can be viewed as a special case non-numeric '''Entity ID''' associated specifically with the DYNARRAY command.
+
 
+
== Version ==
+
 
+
<span style="color:orange;">Does this even do anything? Or just one of those things you have to have.</span>
+
 
+
== Map ==
+
 
+
The '''Map''' command tells the game engine what map to display for the demo playback.  The '''Map''' command will be followed on the same line by the file name of the map to be displayed, like so:
+
 
+
<nowiki>0  0  Map maps/City_Zones/City_04_01/City_04_01.txt</nowiki>
+
 
+
The one exception to this is for demos made in supergroup bases.  Demos recorded in Bases will not have any file name specified after the '''Map''' command.  The '''Map''' command will end the line and will be followed by the '''Base''' command on the next line.
+
 
+
== Base ==
+
 
+
Supergroup bases do not have any pre-defined map associated with them.  This is reflected in recorded demos by the '''Base''' command.  Demos recorded in a base will not have any map file name specified after the '''Map''' command, but the next line of the demo file will include the '''Base''' command, which will precedes a large amount of data apparently used to define and generate the base layout.  For example (note that the binary '''Base''' data is incomplete in this example and would typically continue to fill a page or more):
+
 
+
0  0  Map
+
0  0  Base "UÀ�\0x^íYsÛ¸–€ç5©Ê`õ˼Ü8Ü\pùÍ–—¤oÜí±Ü[35¥‚)Äâ5Eª¸\dQ~ý�¸H¤D� \de...
+
 
+
<!-- Is it worthwhile to have a code sample here or is the binary goop just going to confuse people? -->
+
 
+
<span style="color:orange;">Is it worthwhile to have a code sample here or is the binary goop just going to confuse people?  Maybe just say that the binary data used by the base command is beyond the scope of this guide.</span>
+
 
+
The '''Base''' command appears only for demos recorded inside a supergroup base.  Demos recorded in any other location, mission, or circumstance will not include the '''Base''' command.
+
 
+
== Time ==
+
 
+
The '''Time''' command instructs the game engine what time of day to use for the demo playback.  The value which follows the '''Time''' command on this line is the time of day, in hours, using the military time notation (also known as 24-hour clock notation), with fractions of an hour expressed a decimal value.  Hence values following the '''Time''' command may range from 0.0 to 23.99.  In a demo, this line would appear as follows:
+
 
+
0  0  Time 14.428092
+
 
+
Where the value of 14.428092 corresponds to 2:25 PM (and 41 seconds).  Some examples of '''Time''' values, with their equivalent 12-hour clock notation, are as follows:
+
 
+
<span style="color:orange;">Make this a table?</span>
+
 
+
0.000 = 12 Midnight
+
6.500 = 6:30 AM
+
12.000 = 12 Noon
+
16.667 = 4:40 PM
+
22.000 = 10:00 PM
+
 
+
Note that, unlike in-game, the time of day does ''not'' advance in demo playback, so whatever the time is as specified in the demo code is what the time of day will be for the entire demo playback.
+
<!-- That is still correct, yes?  Nothing has changed recently that I missed as far as time of day advancing goes? -->
+
<!-- What happens if you re-issue the Time command part-way through a demo?  I haven't tried that.  Does it change the time?  If so then you could, in theory, splice in a series of incremental Time commands to change the time of day during the playback of a demo.  -->
+
 
+
== POS ==
+
 
+
The '''POS''' command refers to "position".  This is used to tell the game engine ''where'' to place a given ''entity'' in the demo playback.  All players, NPC, and objects (all ''entities''), as well as the demo camera (or '''CAM''') must have a associated '''POS''' command in order to appear properly in the demo.  Changing the '''POS''' values for an ''entity'' over the course of a demo controls the movement of that ''entity'' in the demo.  Changing the '''POS''' is how you move something from point A to point B.
+
 
+
The '''POS''' command is followed by a set of three numerical map coordinates in X Z Y format.  It is important to note that the order is X Z Y (and ''not'' X Y Z).
+
 
+
<span style="color:orange;">POS code sample here</span>
+
 
+
For a given map, the X value corresponds to the North-South position of the ''entity'', the Z value corresponds to altitude or Up-Down position of the ''entity'', and the Y value corresponds to its East-West position. Larger values of X are further to the South, larger values of Z increase altitude, and larger values of Y are further to the West.  Note that, for X & Y, this may be the reverse of what is intuitive for many.
+
 
+
<span style="color:orange;">Map image here, marked up with X & Y</span>
+
 
+
The values for '''POS''' are expressed in feet.  So changing an X value from 1.0 to 2.0 will move an ''entity'' one foot to the South.  Changing an X value from 1.0 to 2641.0 will move an ''entity'' a half mile to the South.
+
 
+
The appearance of '''CAM POS''' in the code is worth special note.  As discussed above, ''CAM'' is used as the '''Entity ID''' for the demo camera -- the POV from which the demo is recorded.  The camera, or ''CAM'', is a special pre-defined demo ''entity'' which uses the text ''CAM'' as its '''Entity ID''' rather than a positive value integer like most ''entities''.  With regards to its use of the '''POS''' command, the '''CAM POS''' lines function the same as for any other ''entity'' in that they determine the position and movement (through changing the position) of the demo camera/POV.
+
 
+
== PYR ==
+
 
+
The '''PYR''' command stands for [http://en.wikipedia.org/wiki/Flight_dynamics "Pitch-Yaw-Roll"].  '''PYR''' is used similarly to the '''POS''' command.  Where '''POS''' is used to specify the position of an ''entity'', '''PYR''' specifies the special orientation of an ''entity''.  Put another way, '''POS''' determines where on the map [[Ms. Liberty]] shows up, and '''PYR''' determines whether she is standing on her head or on her feet.
+
 
+
The ''PYR''' command is followed by three numerical values for Pitch, Yaw, and Roll.  These values are expressed in [http://en.wikipedia.org/wiki/Radians radians], with values ranging from -3.14159 to 3.14159 (-pi to +pi).  A total of two pi (6.28319) represents a complete rotation of 360 degrees for any of the three axes.
+
<!-- Using 0 to 2pi works just as well as -pi to +pi, and so forth. -->
+
 
+
<span style="color:orange;">PYR code sample here</span>
+
 
+
The Pitch (or "P") value determines the up-down orientation of an NPC, object, or other ''entity'' -- whether an ''entity'' is tilting forward or back.
+
 
+
{| class="wikitable" style="text-align:center"
+
|-
+
| [[Image:PYRPitch00.jpg | center | thumb | PYR 0 0 0]]
+
| [[Image:PYRPitch08.jpg | center | thumb | PYR 0.8 0 0]] 
+
| [[Image:PYRPitch08neg.jpg | center | thumb | PYR -0.8 0 0]]
+
|-
+
|}
+
The Yaw (or "Y") value determines the left-right facing of an NPC, object, or other ''entity'' -- whether an ''entity'' is facing to the right or left, rotating around its vertical axis.
+
 
+
{| class="wikitable" style="text-align:center"
+
|-
+
| [[Image:PYRYaw00.jpg | center | thumb | PYR 0 0 0]]
+
| [[Image:PYRYaw16.jpg | center | thumb | PYR 0 1.6 0]] 
+
| [[Image:PYRYaw16neg.jpg | center | thumb | PYR 0 1.6 0]]
+
|-
+
|}
+
 
+
The Roll (or "R") value determines the side-to-side tilt of an NPC, object, or other ''entity'' -- whether an ''entity'' is leaning/rotated to the left or to the right.
+
 
+
{| class="wikitable" style="text-align:center"
+
|-
+
| [[Image:PYRRoll00.jpg | center | thumb | PYR 0 0 0]]
+
| [[Image:PYRRoll16.jpg | center | thumb | PYR 0 0 1.6]] 
+
| [[Image:PYRRoll16neg.jpg | center | thumb | PYR 0 0 -1.6]]
+
|-
+
|}
+
Note that the axis of rotation for most models is at the ''base'' of the model and not through their apparent center/center of mass.
+
 
+
All of the additional comments made regarding '''CAM POS''' also apply for '''CAM PYR''' (relative to the '''PYR''') command.  '''CAM PYR''' is just a '''PYR''' command applied to the ''CAM'' (camera) '''Entity ID'''.
+
 
+
== New ==
+
 
+
'''NEW'' is the command used by the demo to tell the game engine that it is adding a new ''entity'' (NPC, player, object, mission objective, etc.).  The line with the '''NEW''' command is where the unique '''Entity ID''' is first specified (the second numerical value in the line, after the '''Time Increment''') and is the most important value associated with the '''NEW''' command.  When you use the '''NEW''' command to add a new ''entity'', that ''entity'' and anything associated with it must use the same '''Entity ID''' throughout the demo thereafter.
+
 
+
0  37  NEW "Ms. Liberty"
+
 
+
The '''NEW''' command is followed by the name to be attached to that entity.  This can be left blank; the ''entity'' does not ''require'' that a name be attached.  If the name is one word with no spaces, then quotes are not required for the name:
+
 
+
0  26  NEW Statesman
+
 
+
If the name includes spaces (more than one word), then the name must be enclosed by quotation marks:
+
 
+
0  14  NEW "Sister Psyche"
+
 
+
You may enclose single-word names in quotation marks and this will not cause any harm, although recorded demos do not use this convention:
+
 
+
0  26  NEW "Statesman"
+
 
+
NPC, model, and mission objective names do not display during demo playback, but player character names do display.  If you do not want player names to appear over their heads during demo playback, this can be done via demo editing by leaving the name field blank:
+
 
+
0  26  NEW
+
 
+
Or by entering a blank or space between quotation marks for a name:
+
 
+
0  26  NEW " "
+
 
+
The '''NEW''' command can be used mid-way through a demo to add an ''entity'' that was not there at the start of the demo.
+
 
+
== NPC ==
+
 
+
The '''NPC''' command specifies the game model to display for an NPC.  Remember that the '''Entity ID''' for the '''NPC''' line must match the unique '''Entity ID''' assigned by the '''NEW''' command.  For example:
+
 
+
0  14  NEW "Chief Mentalist"
+
0  14  NPC Rikti_Armour_Lieutenant_01
+
 
+
''Entities'' classed an ''NPC'' include all "normal" non-player characters (enemies, allies, monsters, etc.), but also all destructible objects.  Any object in a mission or map which can be destroyed (such as mailboxes, fire hydrants, and everything else in [[Mayhem Missions]]) is considered an ''NPC'' its appearance is managed by the '''NPC''' command.
+
<!-- Is that info on destructible objects necessary or worthwhile to include? -->
+
 
+
<span style="color:orange;">Is there more to say about the NPC command?</span>
+
 
+
<span style="color:orange;">Link to Codex Model List?</span>
+
 
+
== MOV ==
+
 
+
The '''MOV''' command determines the animation performed by an ''entity''.  The animation named after the '''MOV''' command is executed by the ''entity'' specified by the unique '''Entity ID''' on this line.  For example, the following '''MOV''' command will cause the ''entity'' with the unique '''Entity ID''' of "10" to perform the "bow down" emote:
+
 
+
0  10  MOV EMOTE_BOW_DOWN 0
+
 
+
The number at the end of the line is a new feature added to demos with [[Issue 12]].  A "0" (zero) is the default or null value and executes the animation unmodified.  Other values, besides zero, relate the animation to a weapon or object attached to the ''entity''.  <span style="color:orange;">Is this bit on the trailing number right?</span>
+
<!-- I haven't tried to figure these out yet, so maybe someone else who has.  Do I even have it right, so far as it goes? -->
+
 
+
<span style="color:orange;">Link to Codex MOV List?</span>
+
 
+
== HP ==
+
 
+
The '''HP''' code specifies the ''current'' [[Health]] of a destructible NPC.  This code is associated only with NPCs which can be damaged or destroyed.  NPCs or other ''entities'' which can not be damaged do not use this code.  Hence, the '''HP''' code will not be seen in a demo as attached to such NPCs as pedestrians, trainers, contacts, or stores, but will be seen attached to enemies and destructible objects.
+
 
+
Any NPC which uses the '''HP''' code must also have the '''HPMAX''' code associated to it.  '''HP''' specifies the current Health and '''HPMAX''' specifies the maximum [[Health]].  Both codes must be associated with any destructible NPC.
+
 
+
0  5  NEW "Blood Brother Slammer"
+
0  5  NPC Thug_Hellion_01
+
0  5  POS -227.15625 0 130.203125
+
0  5  PYR 0 -0.380427 -0
+
0  5  MOV LOITER_READYC 0
+
0  5  HP 60.00
+
0  5  HPMAX 60.00
+
 
+
For NPC ''characters'' (enemy/ally types), this code is not normally required simply with regards to making such an ''entity'' appear in a demo.  However, this is vital for properly displaying destructible ''objects''.  Many destructible objects have a variable appearance which is based on the relative values of '''HP''' and '''HPMAX'''.  If these lines are not included in the demo for such '''entities''', the game engine will render the destructible objects as if they had zero '''HP'''; which typically (though not always) means that the object will be treated as destroyed and will not be visible in the demo playback.
+
 
+
The values of '''HP''' for an NPC will change over the course of a demo recording as that NPC is damaged or healed.
+
 
+
If you are adding an NPC or object to a demo, and are uncertain whether it is destructible and requires the '''HP'''/'''HPMAX''' code, it is harmless to add this code to an NPC, even if it is not required.
+
 
+
== HPMAX ==
+
 
+
'''HPMAX''' specifies the maximum [[Health]] of an NPC entity.  As mentioned above under the '''HP''' detail, this command is attached to destructible NPCs and objects, which must also have the '''HP''' code attached.
+
 
+
For destructible objects which have a variable appearance, the relative proportion of the values for '''HP''' and '''HPMAX''' determines the appearance of those destructible objects in the demo playback.
+
 
+
== DEL ==
+
 
+
Just as the '''NEW''' command is used to add an ''entity'' to a demo, ''entities'' can also be removed from a demo via the '''DEL''' command.  This command will delete the specified ''entity'', removing them from the demo.
+
 
+
This command is not accompanied by any variables after the command, requiring only the '''Time Increment''' (as all lines do) and the '''Entity ID''', which is the ID of the ''entity'' to be deleted from the demo.
+
 
+
0  70  DEL
+
 
+
== Player ==
+
 
+
The '''Player''' command is used to specify the particular player character around which the demo is being recorded.  It is used just to flag that one specific player character, and only that one character should have the '''Player''' command attached to it.  Other player characters that appear in the demo, that are not the POV character of the demo recording, do not have this flag attached.
+
 
+
This command is an exception to the usual convention for the '''NEW''' command in that the '''Player''' command is issued first and is when the unique '''Entity ID''' is attached to the POV player character (immediately before the '''NEW''' line), appearing like so:
+
 
+
0  48  Player
+
0  48  NEW "Lady Briton"
+
 
+
The '''Player''' command has no associated trailing values or variables.
+
 
+
== COSTUME ==
+
 
+
The '''COSTUME''' command is required for every player character in a demo.  The '''COSTUME''' line includes the variables used to specify the body type, build, and facial dimensions of a character.  It is followed, on subsequent lines, by the '''PARTSNAME''' code which specifies the remainder of the player character costume.
+
 
+
0 1026 COSTUME 0 aad2f6 2.802201 -0.269841 -0.015873 -0.015873 -0.301587 -0.238095 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873 -0.015873
+
 
+
<span style="color:orange;">DOESN'T WRAP, Maybe use a div box instead?</span>
+
<span style="color:orange;">This could possibly use some further detail</span>
+
 
+
== PARTSNAME ==
+
 
+
The '''COSTUME''' line is followed immediately by (currently) 27 lines of the '''PARTSNAME''' code used to specify the costume parts and colors of a player character.  The '''PARTSNAME''' code is also used to specify things such as [[Auras]] and [[Custom Weapons]].  Essentially all things associated with a player character's costume or standard appearance are controlled by the '''COSTUME''' and '''PARTNAME''' code.
+
 
+
0  48  COSTUME 1 89a0ea 0.000000 0.000000 0.000000 -0.118681 -0.006593 -0.102857 -0.253846 0.014769 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
+
0  48  PARTSNAME Tight tights !Hips_V_Pattern_Strips_01 0000d4 990002
+
0  48  PARTSNAME Tight tights !chest_Fat_Stripe 0000d4 990002
+
0  48  PARTSNAME V_fem_Head.GEO/GEO_Head_V_Asym_Standard !Face_Skin_V_Fem_Head_19 !Face_V_Mask_Executioner_01 0000d4 ffffff
+
0  48  PARTSNAME Flare smooth_matte !glove_Sharp 0000d4 ffffff
+
0  48  PARTSNAME Smooth tights !Boot_V_Pattern_Stripe_01 0000d4 990002
+
0  48  PARTSNAME none none none ffffff ffffff
+
0  48  PARTSNAME Student_01 Long_01a Long_01b 00fdff 1c67ff
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME Tight base Lion_01 00fdff 00cacc
+
0  48  PARTSNAME Smooth spiked_01a spiked_01b 0000d4 ffffff
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME none none none 00fdff 00fdff ffffff ffffff WEAPONS/Custom_Claws/Fem_ClawsRight_TalsorianBlade01.fx
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME Half Cape_Top_01 none ffffff ffffff
+
0  48  PARTSNAME Half_31 Generic_01a Generic_01b 00fdff 3fbeff
+
0  48  PARTSNAME none Cape_01 none ffffff ffffff ffffff ffffff capes/CapeLongFem.fx
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME none none none 00fdff 00fdff ffffff ffffff WEAPONS/Custom_Claws/Fem_ClawsLeft_TalsorianBlade01.fx
+
0  48  PARTSNAME none none none 00000000 00000000
+
0  48  PARTSNAME none none none 00000000 00000000
+
 
+
<span style="color:orange;">Tackling these in greater detail -- what line is what costume section, for  example, talking about colors, etc. -- might be a good addition.</span>
+
 
+
== XLU ==
+
 
+
<span style="color:orange;">Function unknown. Does changing this have any affect on character appearance or demo playback?</span>
+
 
+
== SEQ ==
+
 
+
Just as the '''NPC''' command is used to specify the appearance (and model) of an NPC, the '''SEQ''' command is used to specify the appearance of a non-destructible, clickable object.  '''SEQ''' is attached specifically to the type of ''entity'' used for non-destructible, clickable mission objective objects ("clickies" or "glowies").  These particular types of ''entities'' are distinct from NPCs, with a different type of model code.
+
<!-- Also the Bloody Bay & Warburg terminals, in addition to traditional mission objective glowies, I believe. -->
+
 
+
However, these '''SEQ''' ''entities'' do not current appear during demo playback (and this has been the case since demos were first introduced).  '''SEQ''' objects are invisible when the demo is played back and do not show up.
+
 
+
Additionally, please note that the '''SEQ''' ''entities'' use a different set of model names specific to the '''SEQ''' command.  This means that you can not simply replace the '''SEQ''' command with '''NPC''' to make these models appear during demo playback.  Swapping the commands in this way would only work if you also changed the model name to use an '''NPC''' model equivalent to the '''SEQ''' model (most ''do'' appear to have equivalent '''NPC''' models, however).
+
<!-- I do NOT have a mapping of equivalent SEQ to NPC models, sorry. -->
+
 
+
== 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).
+
 
+
<span style="color:orange;">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?  Is origin always 0 0 or do beam effects, where the zap can be seen traveling from A to B have an ORIGIN line that includes the source Entity ID.</spam>
+
 
+
== 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/targeting recticle powers).
+
 
+
== FXDESTROY ==
+
 
+
Ends an FX.
+
 
+
== SKY ==
+
 
+
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 are DYNLIB.
+
 
+
== CHAT ==
+
 
+
Chat.  Did I12 remove chat from global channels and such from demos?  Haven't noticed anything but local-type stuff in a few I've looked at.
+
 
+
== FLOAT ==
+
 
+
"Pop up" text (like "Salvage Found").  Note that it makes calls to pre-defined text strings, so doesn't look like you can customize the text seen, just pick from the pre-defined messages.
+
 
+
== floatdmg ==
+
 
+
Damage-specific float text.
+
 
+
== EntRagdoll ==
+
 
+
Ragdoll stuff.  The code variables obviously manage ragdoll physics playback appearance (but no idea what they all mean)
+
 
+
== DYNLIB ==
+
 
+
Base entity code based off of previous line NPC call.
+
 
+
= How Tos & FAQs =
+
 
+
== How NPCs/Objects/Models Work ==
+
 
+
How ''Entities'' work.
+
 
+
== How the Camera Works ==
+
 
+
(Remember axis through the head thing.)
+
 
+
== How Movement Works ==
+
 
+
== How FXs Work ==
+
 
+
 
+
== 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.
+
 
+
War Walls Up:  0  DYNGROUPS DYNARRAY |100,0
+
War Walls Down:  0  DYNGROUPS DYNARRAY |0,0
+
 
+
== 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)
+
* [http://boards.cityofheroes.com/showflat.php?Cat=&Board=faq&Number=851259 Demo File Format FAQ] (07/07/04)
+
* [http://files.filefront.com/StormknightsVideoGuide+1+0pdf/;9888227;/fileinfo.html Storm Knight's Video Guide] (08/07/04)
+
* [http://boards.cityofheroes.com/showflat.php?Cat=&Board=faq&Number=1874789 Screenshot and Demo Guide v2] (12/09/04)
+
* [http://boards.cityofheroes.com/showflat.php?Cat=&Board=faq&Number=1939763 A Kitty's guide to making CoH movies!] (12/21/04)
+
* [http://boards.cityofheroes.com/showflat.php?Cat=&Number=3322019 Demo Editing and Videos - The end-to-end guide] (07/20/05)
+
* [http://boards.cityofheroes.com/showflat.php?Cat=0&Board=faq&Number=5659797 Paris' Demo Guide] (06/01/06)
+
* [http://boards.cityofheroes.com/showflat.php?Cat=0&Board=faq&Number=6017752 DEMO File Format: Addendum (character parts)] (07/16/06)
+
* [http://boards.cityofheroes.com/showflat.php?Cat=0&Number=10177900&an=0&page=0#Film Toons on Film City Scoop article] (02/08/08)
+
* [http://boards.cityofheroes.com/showflat.php?Cat=0&Number=10262307 Demo Edit Tutorial: Jumping on a moving truck] (02/21/08)
+
 
+
== Tools & Applications ==
+
 
+
* [http://home.kc.rr.com/dasloth/CoH/Demos/DemoEdit.htm Zloth's CoH Demo Editor]
+
* [http://files.filefront.com/CoH+demo+editor/;9888228;/fileinfo.html Storm_Knight's CoH demo editor]
+
* [http://home.earthlink.net/~balshor/DemoEditorInstaller.exe Balshor's Demo Editor]
+
 
+
== Other ==
+
 
+
* [http://home.twcny.rr.com/scuzzbopper/coh/index.html CoH Codex (Demo Model, MOV, FX, & Maps data)]
+

Latest revision as of 00:24, 11 June 2008

Moved Live: Demo Editing

Genuinely just for notes now.