XML:BINA/ONIE: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 100: Line 100:
| <Particles>
| <Particles>
| -
| -
| If no data is present only "<Particles />" is used. Otherwise "<Particles>" gets closed with "</Particles>". It can hold <Particle>
| If no data is present only "<Particles />" is used. Otherwise "<Particles>" gets closed with "</Particles>".
|-
|-
| <Particle>
| <Particle>
| -
| -
| Closes with "</Particle>". There can be multiple particle tags. Watch out for the different values at <Location>.
| There can be multiple particle sections. They closes with "</Particle>". Watch out for [[#particle structures|different structures]] when setting the <Location> value.
|-
|-
| <Name>
| <Name>
Line 141: Line 141:




===particle structures===
'''particle location 0'''
'''particle location 0'''
                         <Particle>
                         <Particle>

Revision as of 09:14, 1 May 2012

BINA/ONIE: impact effects

Template:XMLModdingHints

The xml code on this page is compatible with onisplit v0.9.61.0


XML area

general information

  • BINAEINOimpact_effects.oni is stored globally (in edition/GameDataFolder/level0_Final)


file structure

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <ImpactEffects>
       [...]
   </ImpactEffects>
</Oni>

[...] = <Impact Name="..." /> and its content, closed by </Impact>

impact name
 |
 +-- material name n (multiple (n) materials possible)
      |
      +-- impact effect n (multiple (n) effects possible, effects can be double if components / modifiers are different)
           |
           +-- component
           +-- modifier
           +-- sound
           +-- particles
                |
                +-- particle n (multiple (n) particle possible)


list of tags, types, and flags

tag type description
<Impact Name="Imptname"> char[128] Closes with "</Impact>". Holds material tags (with different names).
<Material Name="Mtrlname"> char[128] Closes with "</Material>". Can hold multiple <ImpactEffect> if the component and/or the modifier is different.
<ImpactEffect> - Closes with "</ImpactEffect>".
<Component> flag
Impact
Damage - in original ONIE file: modifier "Any" always follows and sound has either no link (<Name />) or has no data at all (<Sound />)
Projectile
<Modifier> flag
Any
Heavy
Medium
Light
<Sound> - If no data is present only "<Sound />" is used. Otherwise "<Sound>" gets closed with "</Sound>"
<Name> link OSBDfile.imp.oni (don't use file prefix/suffix)
<AICanHear> flag
true
false
<AISoundType> flag
Unimportant
Interesting
Danger
Melee
Gunfire
<AISoundRadius> float sound radius
<Particles> - If no data is present only "<Particles />" is used. Otherwise "<Particles>" gets closed with "</Particles>".
<Particle> - There can be multiple particle sections. They closes with "</Particle>". Watch out for different structures when setting the <Location> value.
<Name> link BINA3RAPfile.oni (don't use file prefix/suffix)
<Orientation> flag
0 - impact projectile orientation?
1 - impact projectile reversed orientation?
2 - impact direction perpendicular?
3 - impact projectile velocity orientation?
<Location> flag
0 - impact location
1 - impact location + impact direction * offset ?
4 - impact location; used for decals
5 - impact location and attach to character?
particle is fixed to character if origin is particle-character collision, not fixed if origin is character-character collision*. (* example: look up plasma shot "w3_phr_x02" and add it in particle section of <Impact Name="Kick_Hit">)
<Offset> float ?
<Decal1> float ?
<Decal2> float ?


particle structures

particle location 0

                       <Particle>
                           <Name>...</Name>
                           <Orientation>...</Orientation>
                           <Location>0</Location>
                       </Particle>

particle location 1

                       <Particle>
                           <Name>...</Name>
                           <Orientation>...</Orientation>
                           <Location>1</Location>
                           <Offset>...</Offset>
                       </Particle>

particle location 4

                       <Particle>
                           <Name>...</Name>
                           <Orientation>0</Orientation>
                           <Location>4</Location>
                           <Decal1>false</Decal1>
                           <Decal2>true</Decal2>
                       </Particle>

particle location 5

                       <Particle>
                           <Name>...</Name>
                           <Orientation>...</Orientation>
                           <Location>5</Location>
                       </Particle>


Visual guides: weapon, melee, environment

Note about philosophy in here:

These visual guides don't claim be hundred percent right in technical way. I can't look into engine. But they should give a good hint which files are worth to care about and how to debug a mistake: going through all important files, e.g. Could it be that my new texture is not registered in TMBD?
However, if you think you should add information or shape this in a more accurate way then do it. =)


overview of involved files when modding ONIE in relation to weapons
if weapon shall have impact effect on environment if weapon shall have impact effect on characters

ONWC-ONIE-AKEV_preview.png

  • weapon fires a particle
  • particle creates a sound and hits textured environment
  • texture’s material name is looked up in TMBD (decals do not work)
  • material file is looked up (can hold parent material)
  • effect is chosen from ONIE by weapon and material
  • if parent material* exists then it is possible that a second effect is lunched
  • ONIE effect leads to a particle and sound file which means the effect (however, sound can be also played from released particle)

* Loser’s material “Explosive” has “Glass” as parent material which shatters objects when hit; this can destroy any object - not just the "glassworld".

ONWC-ONIE-ONCC_preview.png

  • weapon fires a particle
  • particle creates a sound and hits character part
  • character part has an Id (probably through TRIA), Id is sent to CBPM
  • material file is looked up (can hold parent material)
  • effect is chosen from ONIE by weapon and material
  • ONIE effect leads to a particle and sound file which means the effect (however, sound can be also played from released particle)
  • it seems that effects on characters cannot be created through TMBD (still you can see a not working test there called "Character")
  • custom materials can be used for characters in case they are registered in ONIE


overview of involved files when modding ONIE in relation to animations
special attack normal attack

ONCC-ONIE-ONCC_sp-a_TN.png

  • Character performs special attack and shouts attack's name (registered in ONCC).
  • TRAM holds link to ONIA, for example: Eliflash1
  • ONIA holds impact type, for example: <Type>Eli_Super_Kick</Type>
  • Impact file is looked up, data is sent to ONIE.
  • Okay, back to TRAM which hits enemy.
  • Enemy's bone is hit, TRIA is looked up and data sent to CBPM.
  • CBPM checks material, data is sent to ONIE.
  • So, final effect is chosen from impact type and material.
  • Particle and sound becomes released.

ONCC(ONIA) holds special attack modifier information (Any/Light/Medium/Heavy) for ONIE.

Main difference is that ONIA is not used here but CBPI.

ONCC-ONIE-ONCC_n-a_TN.png


Hurt sounds: Every ONCC provides one death sound and three hurt sounds.

  • Heavy hurt sound is played when h2h attack deals equal or more than 15 hit points.
  • Medium hurt sound is played when h2h attack deals equal or more than 10 hit points.
  • Light hurt sound is played when h2h attack deals less than 10 hit points.


overview of involved files when modding ONIE in relation to characters
if character hits ground something left ?

ONCC-ONIE-AKEV_preview.png

  • Character hits textured environment.
  • Texture is registered in TMBD and leads to material for ONIE.
  • The bone Id is used for the character's impact.
  • Now actual impact file (Impt) is looked up.
  • Effect (particle and sound) is chosen from impact and the material: trough ONIE.

For example, this is used when running around. Every step will trigger a step sound, different to ground's material: dirt, snow, metal, etc..

ONCC holds impact modifier information (Any/Light/Medium/Heavy) for ONIE.

  • Footstep_Walk
  • Footstep_RunMain
  • Footstep_Crouch
  • Fall_Slide
  • Fall_Land
  • Fall_LandHard
  • Fall_Knockdown
  • Fall_Knockdown
  • Fall_Knockdown
  • Footstep_Turn
  • Footstep_RunStart
  • Footstep_SingleStep
  • Footstep_RunStop
  • Footstep_WalkStop
  • Footstep_RunSprint


examples

Particle - Character

Extra damage for head hits


I haven't gotten to try these files out yet (hopefully soon), but I like the idea. I just want to give my opinions on a couple things on a conceptual level:

  • a couple weapons don't make sense with this system; the Screaming Cell doesn't strike your body at all, it absorbs life energy, so this idea is not applicable to this weapon; but I guess you've already dropped it from this system, so that's good
  • secondly, the VDG also doesn't strike a point on the body to make its effect, it shocks the entire body. So I don't think the body part being "hit" is actually relevant for that weapon's stun effect, particularly since you can't really "aim" branching electricity at someone; also, the damage of 1HP is just a token value and should probably stay that way
  • the Mercury Bow is an odd weapon; it fires a sliver at you which somehow is supposed to do great injury even though a bullet would probably do a lot more damage to someone's body in real life (supposed "mercury poisoning" effect of the sliver aside). What do you think about making the Bow do a good bit less damage to the body, and a lot more damage to the head? Since it's such a precise weapon, it seems more in line with the nature of the Bow to require accurate shots to do real damage (and I believe we might still be considering adding the sniper scope script to the AE, so long-range shots could also be accurate).

Anyway, thanks for the work, this looks cool! --Iritscen 17:27, 18 May 2009 (UTC)

  • Yep
  • Yep
  • Disagree: the AI doesn't really do headshots.
Gumby 17:30, 18 May 2009 (UTC)
I guess you're right, I forgot to think about the AI that wouldn't know to aim for the head. --Iritscen 17:57, 18 May 2009 (UTC)
AI can be learnt to score "headshots", however, that requires all characters to have similar height. In ONWC, some values around 0x100 - 0x120 in primary firing component if I recall correctly are used to tell AI where to aim according to its target's root (pelvis) when shooting with primary fire. It is set zero or low, so AI tends to shoot into stomach. Set Y component a bit higher to achieve chest/headshots. But then be prepared for consequences - if character is minimized (lenght from root to head is smaller), AI will be happily missing character. Good luck with it, if you want to try it. P.S.: delete this immediately if you don't like it. I don't want to waste space.--Loser 18:11, 18 May 2009 (UTC)
Delete what? Regardless, a bit simpler solution is to set the ballistic trajectory values in the ONWC. It doesn't work quite as well, but is good enough for a slight elevation change, IIRC. Gumby 07:11, 19 May 2009 (UTC)
Agreed to point one and two, and even point three. But I don't feel like picking it up. Rudely said: I've already to much else to do like you all too. So, I had say let's keep it in "mod idea" section for later days. :) Paradox-01 20:32, 18 May 2009 (UTC)


Mod ideas

  • How about melee attacks dealing more damage on head/helmet?
Could be more easily\accurately done with an attached particle on the hit_head animations. Gumby 03:54, 10 May 2009 (UTC)
For example, Ninja's PPK looks like it doesn't care whether it hit the head or an arm. It just has <HitAnimationType>HitHead</HitAnimationType> and this is played on target as long as PPK wasn't blocked, right? :/ Paradox-01 13:41, 10 May 2009 (UTC)
D'oh. Yeah, forgot. Lazy\overworked Oni devs. >_< Hmm. Well we could almost implement locational attacks, except for a few problems. The most major one being the blue shield effect. ;) Gumby 00:54, 11 May 2009 (UTC)
  • Footprints in snow. Should be possible through character-environment collision plus decals or particle which becomes fixed to the ground.
Not quite. What would need to be done is have a particle attached to the character by spawning them and doing a single frame (basically 0, if interpolated, i think) animation to activate some attached particles that spawn decals. :)
I think I know what you mean. The decal is every time dropped in first TRAM frame. An alternative might be to set CollideWithWalls=true in attached particle and use HitWall event to drop the decal. Paradox-01 13:41, 10 May 2009 (UTC)
No, the decal emitter is attached in the frame of a special animation that spawns it. The alternative version is the easiest way to go, and won't get buggered by other things.Gumby 00:54, 11 May 2009 (UTC)
We could also have this activate cold breath effects. :) The former would only be good if we had an actual snow level (or dirt :P), but the latter would be good for Compound. Gumby 03:54, 10 May 2009 (UTC)
Yeah, that would be fun. ^^ Paradox-01 13:41, 10 May 2009 (UTC)
  • Guns doing more damage to flesh\cloth than armour\metal.
I had the same thought as you a while ago, when we first had ONIE modding unlocked for us. However, I think a better application might be for guns to deal less damage to armour than to flesh. In fact, all the neccessary materials are already in place, there are seperate effects for bullet hits already. :) Gumby 03:54, 10 May 2009 (UTC)
Okay, I will add damage dealing particle for flesh/cloth material around next week. Paradox-01 13:41, 10 May 2009 (UTC)
Coolio. Make sure to upload your files somewhere, or catch me on Yahoo. I'll include it as a package in the next AE. (Not that I don't know how to do it myself, but the installer is taking up all my Oni time atm...) Gumby 00:54, 11 May 2009 (UTC)