XML:BINA/OBJC/PART: Difference between revisions

From OniGalore
< XML:BINA‎ | OBJC
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:XMLModdingHints}}
{{XML_OBJC_Header | prev=NEUT | type=PART | next=PATR | name=Particle}}


'''general information'''
==General information==
* '''BINACJBOParticle.oni''' is level specific. (It can be found in edition/GameDataFolder/level''XX''_... )
* The XML on this page is based on OniSplit '''v0.9.61.0'''.
* BINACJBOParticle is level-specific (level''x''_Final.dat).


==BSL support==
* http://ssg.oni2.net/commands.htm#dev-p3
The following command kills a particle with a given name, but only the first one of that name, so don't double-spawn the particle:
* particle ''BSL_name'' kill (kill counts also as die event)


'''BSL support'''
The following command resets a particle:
* http://ssg.oni2.net/commands.htm#dev-p3
* particle ''BSL_name'' reset


following command can kill different particle with same tag at once but only one of each, so don't double spawn
The following commands utilize the defined [[XML:BINA/PAR3#Event_types|particle events]].
* particle ''particle_name'' kill (kill counts also as die event)
following command reset particle
* particle ''particle_name'' reset
following commands depend on [[OBD_talk:BINA/PAR3#event_types|particle events]]


{|
{|class="wikitable" width="100%"
{{table}}
|width=50%|
|width=50% | particle ''particle_name'' update
: <font color="#777777">BSL_name = <Tag> in BINACJBOParticle.xml / <Name> in [[XML:ENVP|ENVP]]</font>
| p3_callevent ''particle_name'' 0
|
: <font color="#777777">file_name = <Class> in BINACJBOParticle.xml / <ParticleClass> in [[XML:ENVP|ENVP]]</font>
|-
|-
| particle ''particle_name'' pulse
| particle ''BSL_name'' update
| p3_callevent ''particle_name'' 1
| p3_callevent ''file_name'' 0
|-
|-
| particle ''particle_name'' start
| particle ''BSL_name'' pulse
| p3_callevent ''particle_name'' 2
| p3_callevent ''file_name'' 1
|-
|-
| particle ''particle_name'' stop
| particle ''BSL_name'' start
| p3_callevent ''particle_name'' 3
| p3_callevent ''file_name'' 2
|-
|-
| particle ''particle_name'' bgfx_start
| particle ''BSL_name'' stop
| p3_callevent ''particle_name'' 4
| p3_callevent ''file_name'' 3
|-
|-
| particle ''particle_name'' bgfx_stop
| particle ''BSL_name'' bgfx_start
| p3_callevent ''particle_name'' 5
| p3_callevent ''file_name'' 4
|-
|-
| particle ''particle_name'' hit_wall
| particle ''BSL_name'' bgfx_stop
| p3_callevent ''particle_name'' 6
| p3_callevent ''file_name'' 5
|-
|-
| particle ''particle_name'' hit_char
| particle ''BSL_name'' hit_wall
| p3_callevent ''particle_name'' 7
| p3_callevent ''file_name'' 6
|-
|-
| particle ''particle_name'' lifetime
| particle ''BSL_name'' hit_char
| p3_callevent ''particle_name'' 8
| p3_callevent ''file_name'' 7
|-
|-
| particle ''particle_name'' explode
| particle ''BSL_name'' lifetime
| p3_callevent ''particle_name'' 9
| p3_callevent ''file_name'' 8
|-
|-
| particle ''particle_name'' brokenlink
| particle ''BSL_name'' explode
| p3_callevent ''particle_name'' 10
| p3_callevent ''file_name'' 9
|-
|-
| particle ''particle_name'' create <font color="#777777">(create counts also as update event)</font>
| particle ''BSL_name'' brokenlink
| p3_callevent ''particle_name'' 11
| p3_callevent ''file_name'' 10
|-
|-
| particle ''particle_name'' die
| particle ''BSL_name'' create <font color="#777777">(create counts also as update event)</font>
| p3_callevent ''particle_name'' 12
| p3_callevent ''file_name'' 11
|-
|-
| particle ''particle_name'' newattractor
| particle ''BSL_name'' die
| p3_callevent ''particle_name'' 13
| p3_callevent ''file_name'' 12
|-
|-
| particle ''particle_name'' delay_start
| particle ''BSL_name'' newattractor
| p3_callevent ''particle_name'' 14
| p3_callevent ''file_name'' 13
|-
|-
| particle ''particle_name'' delay_stop
| particle ''BSL_name'' delay_start
| p3_callevent ''particle_name'' 15
| p3_callevent ''file_name'' 14
|-
| particle ''BSL_name'' delay_stop
| p3_callevent ''file_name'' 15
|}
|}


 
==Note about damaging particles==
'''note about ''wannabe-damaging'' particle'''
Damaging particles will make characters "flinch" no matter how little the damage. So particles are responsible for visualizing the danger and a trigger volume is responsible for dealing the damage.
 
Damaging particles would make characters "flinch" no matter how little the damage. So, particle are responsible for visualizing the danger and a trigger volume for dealing the damage.


  particle auto1fire start
  particle auto1fire start
Line 81: Line 85:
  }
  }


 
==File structure==
'''XML structure'''
 
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni Version="0.9.28.0">
  <Oni>
     <ObjectCollection>
     <Objects>
         '''''[...]'''''
         '''''[...]'''''
     </ObjectCollection>
     </Objects>
  </Oni>
  </Oni>


'''''[...]''''' means at least one particle. Paste all particle data into there (this includes '''<font color="#0A0"><Object ...></font>''' and '''<font color="#0A0"></Object></font>''' tag).
'''''[...]''''' means at least one particle. Paste all your particle data in there (this includes '''<font color="#0A0"><PART Id="..."></font>''' and '''<font color="#0A0"></PART></font>''' tag).
 
'''Example'''


'''example'''
[[Image:fire_particle.jpg|right|thumb]]
{| border=0 cellspacing=20 cellpadding=0 align=right
 
|
         '''<font color="#0A0"><PART Id="8463"></font>'''
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/fire.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/fire_preview.png]
|}
         '''<font color="#0A0"><Object Id="8463" Type="PART"></font>'''
             <Header>
             <Header>
                 <Flags>0</Flags>
                 <Flags></Flags>
                 <Position>-1050 45 1610</Position>
                 <Position>-1050 45 1610</Position>
                 <Rotation>0 0 0</Rotation>
                 <Rotation>0 0 0</Rotation>
Line 108: Line 109:
                 <Tag>auto1fire</Tag>
                 <Tag>auto1fire</Tag>
                 <Flags>13</Flags>
                 <Flags>13</Flags>
                 <Decal>
                 <DecalScale>1 1</DecalScale>
                    <XScale>1</XScale>
                    <YScale>1</YScale>
                </Decal>
             </OSD>
             </OSD>
         '''<font color="#0A0"></Object></font>'''
         '''<font color="#0A0"></PART></font>'''
 
==Tags==
* <Flags>: unknown, usually empty
* <Position>: particle is created at this XYZ position
* <Rotation>: particle has this XYZ rotation in degrees
* <Class>: file name, can have up to 64 characters
* <Tag>: name for use in BSL, can have up to 48 characters
* <Flags>:
: NotInitiallyCreated
* <Decal>: first comes the X (horizontal) scaling (float value), then a space, then the Y (vertical) scaling (float value); "1" seems to show the image at its original size, which can be rather small in-game if the actual decal file uses also a small scale


'''tags'''
{{XML}}
* <Flags> : (unknown, usually 0)
* <Position> : (particle is created at this xyz-position)
* <Rotation> : (particle has xyz-rotation (in degrees))
* <Class> : (file name, can have up to 64 characters)
* <Tag> : (name for BSL use, can have up to 48 characters)
* <Flags> :
: 1 - unknown, looks dead
: 2 - not initially created
: 4 - unknown, looks dead, might have been sound related in the past
: 8 - unknown, looks dead
* <Decal>
:: <XScale> : (horizontal scaling; float value ("1" seems to show image in original size))
:: <YScale> : (vertical scaling; float value)

Latest revision as of 01:14, 3 April 2021

PART : Particle
XML modding tips
  • See HERE to start learning about XML modding.
  • See HERE if you are searching for information on how to handle object coordinates.
  • See HERE for some typical modding errors and their causes.
XML.png
XML

AKEV << Other file types >> CONS

TMBD << Other BINA >> ONIE

NEUT << Other OBJC >> PATR

switch to OBD page

General information

  • The XML on this page is based on OniSplit v0.9.61.0.
  • BINACJBOParticle is level-specific (levelx_Final.dat).

BSL support

The following command kills a particle with a given name, but only the first one of that name, so don't double-spawn the particle:

  • particle BSL_name kill (kill counts also as die event)

The following command resets a particle:

  • particle BSL_name reset

The following commands utilize the defined particle events.

BSL_name = <Tag> in BINACJBOParticle.xml / <Name> in ENVP
file_name = <Class> in BINACJBOParticle.xml / <ParticleClass> in ENVP
particle BSL_name update p3_callevent file_name 0
particle BSL_name pulse p3_callevent file_name 1
particle BSL_name start p3_callevent file_name 2
particle BSL_name stop p3_callevent file_name 3
particle BSL_name bgfx_start p3_callevent file_name 4
particle BSL_name bgfx_stop p3_callevent file_name 5
particle BSL_name hit_wall p3_callevent file_name 6
particle BSL_name hit_char p3_callevent file_name 7
particle BSL_name lifetime p3_callevent file_name 8
particle BSL_name explode p3_callevent file_name 9
particle BSL_name brokenlink p3_callevent file_name 10
particle BSL_name create (create counts also as update event) p3_callevent file_name 11
particle BSL_name die p3_callevent file_name 12
particle BSL_name newattractor p3_callevent file_name 13
particle BSL_name delay_start p3_callevent file_name 14
particle BSL_name delay_stop p3_callevent file_name 15

Note about damaging particles

Damaging particles will make characters "flinch" no matter how little the damage. So particles are responsible for visualizing the danger and a trigger volume is responsible for dealing the damage.

particle auto1fire start
### TV inside function
func void fire_damage(string ai_name)
{
	dprint fire_hurt_konoko
	### ignore the "fire_hurt_konoko"
	### all characters get damage because the TV is registered for all teams (255)
	### ps: this damage cannot be absorbed by a shield
	chr_poison (ai_name, 5, 30, 30);
}

File structure

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

[...] means at least one particle. Paste all your particle data in there (this includes <PART Id="..."> and </PART> tag).

Example

Fire particle.jpg
       <PART Id="8463">
           <Header>
               <Flags></Flags>
               <Position>-1050 45 1610</Position>
               <Rotation>0 0 0</Rotation>
           </Header>
           <OSD>
               <Class>env_fire9_e01</Class>
               <Tag>auto1fire</Tag>
               <Flags>13</Flags>
               <DecalScale>1 1</DecalScale>
           </OSD>
       </PART>

Tags

  • <Flags>: unknown, usually empty
  • <Position>: particle is created at this XYZ position
  • <Rotation>: particle has this XYZ rotation in degrees
  • <Class>: file name, can have up to 64 characters
  • <Tag>: name for use in BSL, can have up to 48 characters
  • <Flags>:
NotInitiallyCreated
  • <Decal>: first comes the X (horizontal) scaling (float value), then a space, then the Y (vertical) scaling (float value); "1" seems to show the image at its original size, which can be rather small in-game if the actual decal file uses also a small scale