Changes between Version 8 and Version 9 of Actors


Ignore:
Timestamp:
May 10, 2016, 9:37:48 AM (8 years ago)
Author:
sanderd17
Comment:

More detailed description

Legend:

Unmodified
Added
Removed
Modified
  • Actors

    v8 v9  
    1313 * '''Selection''': a text string that usually matches a variant name; the chosen variation will use variants which match one of the selections, where possible.
    1414
    15 == Randomness ==
     15== Randomness and selections ==
    1616
    17 To allow some visual variety between otherwise-identical units, actors can contain 'random' elements. (They are not strictly random - a designer can choose a particular variation of the actor.)
     17Variants are both used to generate random variety amongst the entities(f.e. giving a different shield type to different units), and to let the game code choose certain configurations of the entities (f.e. a unit that's chopping wood holds an axe, and no sword).
    1818
    19 To achieve this, the actor is split into a set of ''groups'', each of which contains several ''variants''.
     19To achieve this, the actor is split into ''groups'', each of which contains several ''variants''.
    2020
    21 The ''frequency'' of each variant controls how likely it is to be chosen. If two variants have equal frequency values, they have equal chance of being selected. If a variant's frequency is set to 0, it will never be chosen by the randomiser. A zero-frequency variant can still be selected by the game - for example, actors could have 'Summer' and 'Winter' variants, with the default always being Summer, and then the game could change the whole world to Winter.
     21From each group, a variant is chosen, and the chosen variants are combined into a ''variation''. Most actors have a single "Base" variant in a group that defines the general properties of the actor (a single mesh to use, some default props, ...). And that default definition is extended by choices from the other groups.
     22
     23Variants have the following ''attributes'' in their XML:
     24
     25* A '''frequency''' controls how likely it is to be chosen. This must be set if the variant should be chosen randomly, or if there's a default variant (f.e. the Idle state of a unit). If two variants have equal frequency values, they have equal chance of being selected. A zero-frequency variant can still be selected by the game.
     26* A '''name''' makes it possible for the game code to select a certain variant. These names should be standardised, and follow the terms the game uses (f.e. ''gather-tree'' and not ''chop-wood''). If a name is chosen (either by randomness or by the game code), it's selection is also passed on to the props. So when that name appears in a variant of the included props, that variant will be chosen. But variants that are chosen randomly don't need a name.
     27* The '''file''' attribute makes it possible to include a variant from an external file. The contents of the file gets merged with the contents of the actor (note that the external file may also have a ''name'' and/or a ''frequency'' defined).
     28
     29Then finally, the look of the actors is defined in the content of the variants. These are the different elements you'll find there:
     30
     31* '''mesh''': The *.dae or *.pmd model to use.
     32* '''props''': A list of extra actors that are attached to "prop points" (bones). Setting a prop with a certainn attachpoint but no actor will clear the actor chosen in a previous variant. By setting a ''minHeight'' and ''maxHeight'', the prop will stay relative to the ground level (within it's given bounds). This allows to create "drop-props" that make a building adapt to the terrain. Setting the ''selectable'' to ''false'' will ignore the prop when calculating the selection box.
     33* '''textures''': A list of textures to use. This includes AO, Specular, and Normal maps. The name should show what type of texture it is.
     34* '''animations''': A list of animations. The default animation is always "Idle", but other animations are chosen by the game. When multiple animation have the same name, the graphic code will choose a random animation from the list every time an animation ends (unlike randomness in variants, which is more permanent). As a result, animations with the same name should blend well together. Depending on the action used, the animation will be played at the ''speed'' given, or the engine will try to sync the animation on a certain ''event'' (f.e. when shooting an arrow, the animation speed is altered so every arrow that departs matches the event).
     35* '''decal''': only used on special decal actors (which are in turn used as props on regular buildings), the parameters here define how a textures (defined under the ''textures'' list) are placed on the terrain.
     36* '''particles''': only used on special particle actors that define smoke, fire and other special effects.
     37* '''color''': ''(no idea what this does)''
     38
    2239
    2340For example here is how an actor might appear in actor editor:[[BR]]