XML:Adding Daodan powers to a character

From OniGalore
Revision as of 17:19, 3 April 2020 by Paradox-01 (talk | contribs)
Jump to navigation Jump to search
Unfinished building-60px.jpg

This page is unfinished. Can you fill in any missing information?
If it is not clear which part of the page is unfinished, ask on the talk page.

Enable Daodan

Open and ONCC xml file and go to <HasDaodanPowers>. Set the value to 1.


Add Daodan particle

Particles must be added in ONCC before they can be used.

Traditionally standard Daodan particle are emitted from the pelvis, the left fist and the right fist.


  • Name - normally this is an anchor for TRAM files but "super_" is possibly a master flag (used for all animations)
  • Type - particle (BINA3RAP) file
  • BodyPart - pretty much what the name suggests, see ONCP flags
           <ONCPParticle>
               <Name>super_glow</Name>
               <Type>superglow_e01</Type>
               <BodyPart>Pelvis</BodyPart>
           </ONCPParticle>
           <ONCPParticle>
               <Name>super_l_hand</Name>
               <Type>super_e01</Type>
               <BodyPart>LeftFist</BodyPart>
           </ONCPParticle>
           <ONCPParticle>
               <Name>super_r_hand</Name>
               <Type>super_e01</Type>
               <BodyPart>RightFist</BodyPart>
           </ONCPParticle>


Change Daodan particle appearance

Emitters

With emitter particle you set up properties for the other, visible particle: start positions, movement and creation rate.


Lensflare types

These textures (TXMP) are meant to smoothly overlay each other creating the illusion of a fog or aura.

Smooth blending of dark or black textures is not really possible.


Forms
<TexGeom>
Link to texture (TXMP) file.


Behaviours
<DisplayType>
See BINA3RAP documentation.


Colors

Typically white shapes are used so you can give them later any color you want by using the Tint tag.

Tint tag:

<Tint>51 76 255

Since <Tint> uses here a RGB value, the <Color Name="tint"> is ignored. Possibly the developer just didn't cleaned up the unused variable.

Color overwrite (unused):

      <Variables>
           <Color Name="tint">
               <Random Min="230 230 255" Max="128 128 255" />
           </Color>


File structure

Most particle actually consist of multiple particle files and hence should be seen as their very own systems.

Like this:

_e
 |
 +--- _e
 |     |
 |     +--- _p
 |     +--- _p
 |           
 +--- _p
 +--- _p
 +--- _p
 +--- _p


Sample code

Emitter

  • Variable - holds the rate (frequency) to emit particles
  • Emitter - determines some properties of sub emitters or actual particles
  • Events > Update > SuperParticle - overwrites the default emit rate (Variable)
Traditionally, while the _e file controls the emit rate the _p file controls the visibility (transparency a.k.a. alpha value).
  • Events > Update > Start/Stop - holds actions to start and stop the emitter
       <Variables>
           <Float Name="emit_rate">0.2</Float>
       </Variables>
       <Emitters>
           <Emitter>
               <Class>superglow_p01</Class>
               <Flags />
               <TurnOffTreshold>0</TurnOffTreshold>
               <Probability>1</Probability>
               <Copies>10</Copies>
               <LinkTo />
               <Rate>
                   <Continous>
                       <Interval>emit_rate</Interval>
                   </Continous>
               </Rate>
               <Position>
                   <BodyBones>
                       <OffsetRadius>0.7</OffsetRadius>
                   </BodyBones>
               </Position>
               <Direction>
                   <Random />
               </Direction>
               <Speed>
                   <Uniform>
                       <Speed>0.8</Speed>
                   </Uniform>
               </Speed>
               <Orientation>Velocity</Orientation>
               <OrientationUp>TowardsEmitter</OrientationUp>
           </Emitter>
       </Emitters>
       <Events>
           <Update>
               <SuperParticle>
                   <Variable>emit_rate</Variable>
                   <BaseValue>0.25</BaseValue>
                   <DeltaValue>-0.1</DeltaValue>
                   <MinValue>0.1</MinValue>
                   <MaxValue>20</MaxValue>
               </SuperParticle>
           </Update>
           <Start>
               <EmitActivate>
                   <Emitter>0</Emitter>
               </EmitActivate>
               <EnableNow>
                   <Action>0</Action>
               </EnableNow>
           </Start>
           <Stop>
               <EmitDeactivate>
                   <Emitter>0</Emitter>
               </EmitDeactivate>
               <DisableNow>
                   <Action>0</Action>
               </DisableNow>
           </Stop>
       </Events>


Special animation-bound Daodan particle

A.k.a. Daodan spikes

Unlike the Daodan aura - a.k.a. chenille a.k.a. particle created at 200 % to 100 % health - the Daodan spike particle seen after a few boss fights are called from character animations.

In other words they are just standard particles.

But also those must be registered in ONCC.

           <ONCPParticle>
               <Name>daodan</Name>
               <Type>h2h_powerup_e01</Type>
               <BodyPart>None</BodyPart>
           </ONCPParticle>
           <ONCPParticle>
               <Name>daodan2</Name>
               <Type>h2h_powerup_e01a</Type>
               <BodyPart>None</BodyPart>
           </ONCPParticle>
  • The Name node is used by the character animation (TRAM) file.
  • The Type node belongs to the particle (BINA3RAP) file.
  • The BodyPart node obviously refers to the character bones. That (TRIA) structure is embedded into the 3D model (TRBS) of the character but you only need the list of valid "flags" (names) anyway.


Body part flags

Pelvis
LeftThigh
LeftCalf
LeftFoot
RightThigh
RightCalf
RightFoot
Mid
Chest
Neck
Head
LeftShoulder
LeftArm
LeftWrist
LeftFist
RightShoulder
RightArm
RightWrist
RightFist
KillImpact (possibly creates a virtual bone to allow the ONIE system to work)
None (speculation: every bone/surface at once or bounding box center ?)