18,700
edits
Paradox-01 (talk | contribs) m (<Chop /> doesn't cause Die event) |
(copy edit; I have reversed the descriptions of 0/1 for CanHitMultiple, please revert that change if I am incorrect) |
||
Line 1: | Line 1: | ||
{{XML_BINA_Header|prev=ONIE|type=PAR3|next=SABD|name=Particle v3}} | {{XML_BINA_Header|prev=ONIE|type=PAR3|next=SABD|name=Particle v3}} | ||
== | ===File structure=== | ||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
<Oni> | <Oni> | ||
Line 7: | Line 7: | ||
<Options> | <Options> | ||
<Lifetime></Lifetime> | <Lifetime></Lifetime> | ||
<DisableDetailLevel>[... see '''[[# | <DisableDetailLevel>[... see '''[[#Options|HERE]]''' for possible flags]</DisableDetailLevel> | ||
<Decorative></Decorative> | <Decorative></Decorative> | ||
[...] | [...] | ||
Line 15: | Line 15: | ||
</Properties> | </Properties> | ||
<Appearance> | <Appearance> | ||
<DisplayType>[... see '''[[# | <DisplayType>[... see '''[[#Appearance|HERE]]''' for possible flags]</DisplayType> | ||
[...] | [...] | ||
</Appearance> | </Appearance> | ||
<Attractor> | <Attractor> | ||
<Target>[... see '''[[# | <Target>[... see '''[[#Attractor|HERE]]''' for possible flags]</Target> | ||
<Selector>[... see '''[[# | <Selector>[... see '''[[#Attractor|HERE]]''' for possible flags]</Selector> | ||
<Class /> | <Class /> | ||
[...] | [...] | ||
Line 29: | Line 29: | ||
<Emitters> | <Emitters> | ||
<Emitter> | <Emitter> | ||
[... see '''[[# | [... see '''[[#Emitter|HERE]]''' for emitter data] | ||
</Emitter> | </Emitter> | ||
</Emitters> | </Emitters> | ||
<Events> | <Events> | ||
[... see '''[[# | [... see '''[[#Event types|HERE]]''' for '''''<event_type_tag>'''''] | ||
[... see '''[[# | [... see '''[[#Action types and parameters|HERE]]''' for '''<action_type_tag>'''] | ||
[... see '''[[# | [... see '''[[#Action types and parameters|HERE]]''' for '''''<parameter_tag>[[#Parameter value types|value]]</parameter_tag>'''''] | ||
''<action_type_tag>'' | ''<action_type_tag>'' | ||
''</event_type_tag>'' | ''</event_type_tag>'' | ||
Line 43: | Line 43: | ||
== | ===Options=== | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width=200px| XML tag | !width=200px| XML tag | ||
!width=100px| | !width=100px| Content type | ||
! | ! Description | ||
|- | |- | ||
|valign=top| <Lifetime> | |valign=top| <Lifetime> | ||
|valign=top| float | |valign=top| float | ||
| Particle | | Particle exists for X seconds. | ||
: X is float value, so you could write 1.5 if 1 second is too | : X is a float value, so you could write 1.5 if 1 second is too low and 2 is too high. | ||
: 0 means an infinite lifetime. | : 0 means an infinite lifetime. | ||
|- | |- | ||
Line 64: | Line 64: | ||
|valign=top| <Decorative> | |valign=top| <Decorative> | ||
|valign=top| flag | |valign=top| flag | ||
| | | Lower priority for engine; a decorative particle might not always be updated. | ||
: true | : true | ||
: false | : false | ||
Line 82: | Line 82: | ||
|valign=top| <InitiallyHidden> | |valign=top| <InitiallyHidden> | ||
|valign=top| flag | |valign=top| flag | ||
| Hides the particle | | Hides the particle upon creation. | ||
: true | : true | ||
: false | : false | ||
Line 94: | Line 94: | ||
|valign=top| <DontAttractThroughWalls> | |valign=top| <DontAttractThroughWalls> | ||
|valign=top| flag | |valign=top| flag | ||
| Particle will not detect | | Particle will not detect potential attractor if there is a wall between it and the particle. | ||
: true | : true | ||
: false | : false | ||
Line 130: | Line 130: | ||
|valign=top| <FlyBySoundName /> | |valign=top| <FlyBySoundName /> | ||
|valign=top| link | |valign=top| link | ||
| Sound used when the particle passes by you. | | Sound used when the particle passes by you. To check: does the engine apply the Doppler effect or is it in the sound file itself? | ||
: <font color="#777777">OSBD</font>file<font color="#777777">.imp.oni</font> | : <font color="#777777">OSBD</font>file<font color="#777777">.imp.oni</font> | ||
|} | |} | ||
== | ===Properties=== | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width=200px| XML tag | !width=200px| XML tag | ||
!width=100px| | !width=100px| Content type | ||
! | ! Description | ||
|- | |- | ||
|valign=top| <HasVelocity> | |valign=top| <HasVelocity> | ||
Line 149: | Line 149: | ||
|valign=top| <HasOrientation> | |valign=top| <HasOrientation> | ||
|valign=top| flag | |valign=top| flag | ||
| Needed if the particle is to be able to turn | | Needed if the particle is to be able to turn? | ||
: true | : true | ||
: false | : false | ||
Line 179: | Line 179: | ||
|valign=top| <HasTextureStartTick> | |valign=top| <HasTextureStartTick> | ||
|valign=top| flag | |valign=top| flag | ||
| Used with animated particles. (Documentation Needed) | | Used with animated particles. (Documentation Needed) | ||
: true | : true | ||
: false | : false | ||
Line 185: | Line 185: | ||
|valign=top| <HasTextureTick> | |valign=top| <HasTextureTick> | ||
|valign=top| flag | |valign=top| flag | ||
| Used with animated particles. (Documentation Needed) | | Used with animated particles. (Documentation Needed) | ||
: true | : true | ||
: false | : false | ||
Line 193: | Line 193: | ||
|Used for particles to either: | |Used for particles to either: | ||
: A. Not damage a character | : A. Not damage a character | ||
: B. Credit a character with damage | : B. Credit a character with damage/kills | ||
For this to work properly, the parent of the character must have this set, and the parent of said parent, etc, up to the original particle. | For this to work properly, the parent of the character must have this set, and the parent of said parent, etc., up to the original particle. | ||
: true | : true | ||
: false | : false | ||
Line 200: | Line 200: | ||
== | ===Appearance=== | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width=200px| XML tag | !width=200px| XML tag | ||
!width=100px| | !width=100px| Content type | ||
! | ! Description | ||
|- | |- | ||
|valign=top| <DisplayType> | |valign=top| <DisplayType> | ||
|valign=top| flag | |valign=top| flag | ||
| How the particle is displayed. ( | | How the particle is displayed. (Documentation Needed) | ||
: Sprite | : Sprite | ||
: RotatedSprite | : RotatedSprite | ||
Line 344: | Line 344: | ||
|valign=top| <DecalWrapAngle> | |valign=top| <DecalWrapAngle> | ||
|valign=top| float | |valign=top| float | ||
| Degrees. Decal isn't cut off | | Degrees. Decal isn't cut off for any connecting planes which meet at an angle equal to or less than this value. | ||
|} | |} | ||
== | ===Attractor=== | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width=200px| XML tag | !width=200px| XML tag | ||
!width=100px| | !width=100px| Content type | ||
! | ! Description | ||
|- | |- | ||
|valign=top| <Target> | |valign=top| <Target> | ||
Line 375: | Line 375: | ||
|valign=top| <Class /> | |valign=top| <Class /> | ||
|valign=top| float | |valign=top| float | ||
| Name of a | | Name of a particle that this particle is attracted to. | ||
|- | |- | ||
|valign=top|<MaxDistance> | |valign=top|<MaxDistance> | ||
Line 399: | Line 399: | ||
== | ===Variable storage types=== | ||
{|class="wikitable" width="100%" | {|class="wikitable" width="100%" | ||
!XML tag | !XML tag | ||
! | !Description | ||
|- | |- | ||
|<Float Name="''variable''">''float_value''</Float> | |<Float Name="''variable''">''float_value''</Float> | ||
|A | |A float. | ||
|- | |- | ||
|<Color Name="''variable''">''R G B [A]''</Color> | |<Color Name="''variable''">''R G B [A]''</Color> | ||
Line 411: | Line 411: | ||
|- | |- | ||
|<PingPongState Name="''variable''">''?''</PingPongState> | |<PingPongState Name="''variable''">''?''</PingPongState> | ||
|A float from 0.0-1.0, describes where in the ping pong state the event is | |A float from 0.0-1.0, describes where in the ping-pong state the event is (if my memory is correct). | ||
|} | |} | ||
== | ===Parameter value types=== | ||
Grey is additional for variable section. | Grey is additional for variable section. | ||
{|class="wikitable" width="100%" | {|class="wikitable" width="100%" | ||
Line 449: | Line 449: | ||
7 - color; constant; 1 color follows | 7 - color; constant; 1 color follows | ||
8 - color; random; 2 | 8 - color; random; 2 colors follow (min, max) | ||
9 - color; bell curve; 2 | 9 - color; bell curve; 2 colors follow (mean, stddev) | ||
| | | | ||
<font color="#777777"><Color Name="''variable''"></font>''R G B''<font color="#777777"></Color></font> | <font color="#777777"><Color Name="''variable''"></font>''R G B''<font color="#777777"></Color></font> | ||
Line 471: | Line 471: | ||
== | ===Emitter=== | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width=200px| XML tag | !width=200px| XML tag | ||
!width=100px| | !width=100px| Content type | ||
! | ! Description | ||
|- | |- | ||
|valign=top| <Class> | |valign=top| <Class> | ||
Line 495: | Line 495: | ||
: CycleAttractors | : CycleAttractors | ||
Research notes - files with Unknown0020 flag: | |||
BINA3RAPw8_mbo_p07, BINA3RAPw8_mbo_e03, BINA3RAPw12_ba2_e03, BINA3RAPw10_sni_p01, BINA3RAPpstream_flicker, BINA3RAPheadlight02, BINA3RAPheadlightStart, BINA3RAPheadlight01 | BINA3RAPw8_mbo_p07, BINA3RAPw8_mbo_e03, BINA3RAPw12_ba2_e03, BINA3RAPw10_sni_p01, BINA3RAPpstream_flicker, BINA3RAPheadlight02, BINA3RAPheadlightStart, BINA3RAPheadlight01 | ||
Line 501: | Line 501: | ||
|valign=top| <TurnOffTreshold> | |valign=top| <TurnOffTreshold> | ||
|valign=top| integer | |valign=top| integer | ||
| Tag contains the number (threshold) of particle which must be reached before emitter | | Tag contains the number (threshold) of particle which must be reached before emitter gets turned off. Threshold needs two flags to be set: IncreaseParticleCount and TurnOffAtTreshold. | ||
|- | |- | ||
|valign=top| <Probability> | |valign=top| <Probability> | ||
|valign=top| float | |valign=top| float | ||
| | | | ||
Let's say threshold was set to 10 and probability to 0.5 then you might get 5 | Let's say threshold was set to 10 and probability to 0.5: then you might get 5 particles emitted, sometimes less, sometimes more; it's an average. (threshold * probability = emitted particle) | ||
|- | |- | ||
|valign=top| <Copies> | |valign=top| <Copies> | ||
|valign=top| integer | |valign=top| integer | ||
| It's actually a multiplier | | It's actually a multiplier; set it to 0 and no particle will be emitted. Copies doesn't affect the threshold counting. The copies are emitted at the same place as the original particle so you might not see any difference (because they overlap each other) until they have a random movement. | ||
|- | |- | ||
|valign=top| <LinkTo> | |valign=top| <LinkTo> | ||
Line 768: | Line 768: | ||
== | ===Event types=== | ||
: Update | : Update | ||
: Pulse | : Pulse | ||
Line 824: | Line 824: | ||
== | ===Action types and parameters=== | ||
{| class="wikitable" | {| class="wikitable" | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
Line 835: | Line 835: | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width=160px| XML tag | !width=160px| XML tag | ||
!width=120px| | !width=120px| Content type | ||
! | ! Description | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <AnimateLinear> | | <AnimateLinear> | ||
Line 972: | Line 972: | ||
| <TimeToDie> | | <TimeToDie> | ||
| float | | float | ||
| | | Particle gets killed after X seconds; it fades out during that time. | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <EnableAtTime> | | <EnableAtTime> | ||
Line 980: | Line 980: | ||
| <Action> | | <Action> | ||
| integer | | integer | ||
| | | Has action X as target in Update event section. | ||
|- | |- | ||
| <Lifetime> | | <Lifetime> | ||
| float | | float | ||
| Lifetime of the particle MINUS the value stored in this field yields the | | Lifetime of the particle MINUS the value stored in this field yields the delay from the particle's spawn until the targeted action (action from the "Action" tag) starts operating. Till that moment, the targeted action is held inactive.<BR><font size=1>Example:<BR>If the lifetime of the particle is set to be 3.0, then it counts down from 3.0 to 0.0 (at 0.0, Lifetime event is called).<BR>Now, if the lifetime of the particle is set to be 3.0 and the value here in this tag is 1.0, then from the moment the particle is spawned, this EnableAtTime's targeted action (the action inside the "Action" tag) will be disabled and will activate only after the particle's lifetime goes from 3.0 to 1.0, that is, in 2.0 seconds. That means the targeted action will activate 2 seconds after the particle was spawned.<BR>This mechanism is quite counter-intuitive, hence the detailed description.</font> | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <DisableAtTime> | | <DisableAtTime> | ||
Line 992: | Line 992: | ||
| <Action> | | <Action> | ||
| integer | | integer | ||
| | | Has action X as target in Update event section. | ||
|- | |- | ||
| <Lifetime> | | <Lifetime> | ||
| float | | float | ||
| Lifetime of the particle MINUS the value stored in this field yields the | | Lifetime of the particle MINUS the value stored in this field yields the delay from the particle's spawn until the targeted action (action from the "Action" tag) stops operating. Till that moment, the targeted action is kept active.<BR><font size=1>Example:<BR>If the lifetime of the particle is set to be 3.0, then it counts down from 3.0 to 0.0 (at 0.0, Lifetime event is called).<BR>Now, if lifetime of the particle is set to be 3.0 and value here in this tag is 1.0, then from the moment the particle is spawned, this EnableAtTime's targeted action (the action inside "Action" tag) will be operating and will deactivate only after the particle's lifetime goes from 3.0 to 1.0, that is, in 2.0 seconds. That means the targeted action will deactivate 2 seconds after the particle was spawned.<BR>This mechanism is quite counter-intuitive, hence the detailed description.</font> | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <Die /> | | <Die /> | ||
| - | | - | ||
| | | This action triggers the Die event. | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <SetLifetime> | | <SetLifetime> | ||
Line 1,008: | Line 1,008: | ||
| <Time> | | <Time> | ||
| float | | float | ||
| | | Particle gets killed after X seconds. | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <EmitActivate> | | <EmitActivate> | ||
Line 1,068: | Line 1,068: | ||
| <Sound> | | <Sound> | ||
| link | | link | ||
| <font color="#AAAAAA">OSBD</font>''file_name''<font color="#AAAAAA">.amb.oni</font> (file prefix OSBD and suffix .amb.oni not | | <font color="#AAAAAA">OSBD</font>''file_name''<font color="#AAAAAA">.amb.oni</font> (file prefix "OSBD" and suffix ".amb.oni" are not included) | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <EndAmbientSound /> | | <EndAmbientSound /> | ||
Line 1,080: | Line 1,080: | ||
| <Sound> | | <Sound> | ||
| link | | link | ||
| <font color="#AAAAAA">OSBD</font>''file_name''<font color="#AAAAAA">.imp.oni</font> (file prefix OSBD and suffix .imp.oni not | | <font color="#AAAAAA">OSBD</font>''file_name''<font color="#AAAAAA">.imp.oni</font> (file prefix "OSBD" and suffix ".imp.oni" are not included) | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <DamageChar> | | <DamageChar> | ||
Line 1,096: | Line 1,096: | ||
| <KnockBack> | | <KnockBack> | ||
| float | | float | ||
| Character gets moved from its current position by "knockback value" game world units with 0.1 precision.<BR><font size=1>(Example: If value here is 100, char gets moved | | Character gets moved from its current position by "knockback value", in game world units with 0.1 precision.<BR><font size=1>(Example: If value here is 100, char gets moved ~99.9 units)</font> | ||
Negative values work as well | Negative values work as well -- instead of being "knocked back", the character is "drawn in". | ||
|- | |- | ||
| <DamageType> | | <DamageType> | ||
Line 1,118: | Line 1,118: | ||
| <CanHitMultiple> | | <CanHitMultiple> | ||
| flag | | flag | ||
| | | Tag is missing if value is 0. | ||
: 0 - can be applied | : 0 - can be applied only once on the character, then is ignored | ||
: 1 - can be applied | : 1 - can be applied multiple times on the target character | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <DamageBlast> | | <DamageBlast> | ||
Line 1,132: | Line 1,132: | ||
| <StunDamage> | | <StunDamage> | ||
| float | | float | ||
| Same as the DamageChar's StunDamage | | Same as the DamageChar's StunDamage. | ||
| | | | ||
|- | |- | ||
| <KnockBack> | | <KnockBack> | ||
| float | | float | ||
| Same as the DamageChar's Knockback | | Same as the DamageChar's Knockback. | ||
| | | | ||
|- | |- | ||
| <Radius> | | <Radius> | ||
| float | | float | ||
| Radius of the damaging sphere.<BR><font size=1>(Example: If value here is 100, character gets damaged if its distance from the position of the damaging particle is less | | Radius of the damaging sphere.<BR><font size=1>(Example: If value here is 100, character gets damaged if its distance from the position of the damaging particle is less than or equal to 100 game world units.</font> | ||
| | | | ||
|- | |- | ||
Line 1,175: | Line 1,175: | ||
| <DamageEnvironment> | | <DamageEnvironment> | ||
| flag | | flag | ||
| <font color="#777777">This tag is not exported if the data field in the oni file is "00". It is exported when "0A" was set.</font> | | <font color="#777777">This tag is not exported if the data field in the .oni file is "00". It is exported when "0A" was set.</font> | ||
: 0 | : 0 | ||
: 1 | : 1 | ||
Line 1,181: | Line 1,181: | ||
| <Explode /> | | <Explode /> | ||
| - | | - | ||
| | | This action triggers the Explode event. | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <DamageEnvironment> | | <DamageEnvironment> | ||
Line 1,205: | Line 1,205: | ||
| <Stop /> | | <Stop /> | ||
| - | | - | ||
| | | This action triggers the Stop event. | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <RotateX> | | <RotateX> | ||
Line 1,481: | Line 1,481: | ||
| <Chop /> | | <Chop /> | ||
| - | | - | ||
| | | This action kills the particle without triggering the Die event. | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| [[XML:Impt|<ImpactEffect>]] | | [[XML:Impt|<ImpactEffect>]] | ||
Line 1,489: | Line 1,489: | ||
| <ImpactType> | | <ImpactType> | ||
| | | | ||
| Name of impact, registered in ONIE. The looked up material is known from | | Name of impact, registered in ONIE. The looked-up material is known from the colliding particle. Impt and Mtrl files must exist. | ||
|- | |- | ||
| <ImpactModifier> | | <ImpactModifier> | ||
Line 1,497: | Line 1,497: | ||
| <Show /> | | <Show /> | ||
| - | | - | ||
| | | Unhide particle. | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <Hide /> | | <Hide /> | ||
| - | | - | ||
| | | Hide particle; cannot collide with characters anymore, emitters stay active. | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <SetTextureTick> | | <SetTextureTick> | ||
Line 1,569: | Line 1,569: | ||
| <Action> | | <Action> | ||
| integer | | integer | ||
| | | Enables action X in Update event section. | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <DisableNow> | | <DisableNow> | ||
Line 1,577: | Line 1,577: | ||
| <Action> | | <Action> | ||
| integer | | integer | ||
| | | Disables action X in Update event section. | ||
|- style="background-color:#DDDDDD" | |- style="background-color:#DDDDDD" | ||
| <SuperBallTrigger> | | <SuperBallTrigger> | ||
Line 1,705: | Line 1,705: | ||
|} | |} | ||
== | ===Glass-piercing bullets=== | ||
In the original game, w1_tap goes through normal glass and loses its dangerousness while a bullet of w8_mbo stays dangerous. | In the original game, w1_tap goes through normal glass and loses its dangerousness, while a bullet of w8_mbo stays dangerous. | ||
Particle can perform ''actions'' if a ''hit wall event'' occurs (<CollideWithWalls> must be true). If the particle hits a breakable material (glass) then <StopIfBreakable /> stops the actions that | Particle can perform ''actions'' if a ''hit wall event'' occurs (<CollideWithWalls> must be true). If the particle hits a breakable material (glass), then <StopIfBreakable /> stops the actions that come after StopIfBreakable. The particle continues to fly. If it then hits a non-breakable material, all actions are executed. | ||
If you want to break glass, put <DamageEnvironment> before <StopIfBreakable />. | If you want to break glass, put <DamageEnvironment> before <StopIfBreakable />. | ||
Line 1,743: | Line 1,743: | ||
= | ===Notes on locklights=== | ||
{|class="wikitable" width="100%" | {|class="wikitable" width="100%" | ||
| | | | ||
Line 1,789: | Line 1,789: | ||
</Events> | </Events> | ||
|valign=top| | |valign=top| | ||
Locklights are | Locklights are the particles which indicate whether a door is locked or not. | ||
They are present in [[OBD:ONLV|ONLV]] (ENVP section) with different names, but are all called from "BINA3RAPlocklight.xml" and "BINA3RAPlocklight2.xml". | |||
The locklight is created on level start. | |||
The Update event has three actions: '''<u>the first one has ID 0</u>''', the second has '''<u><font color="#AA0000">ID 1</font></u>''', and the third has '''<u><font color="#00AA00">ID 2</font></u>'''. | |||
The Update event has three | |||
Line 1,804: | Line 1,801: | ||
|} | |} | ||
'''The BINA3RAPlocklight | '''The vanilla BINA3RAPlocklight file doesn't allow new events because of its buggy behavior.''' Gumby solved the problem by putting the "SetVariable" code into the start and stop event. Additional testing discovered that particles identify doors as characters. A small vid can be seen [http://www.youtube.com/watch?v=kY8uH5vRt3Q here.] | ||
{{divhide|See used code here > }} | {{divhide|See used code here > }} | ||
Line 1,947: | Line 1,944: | ||
= | ===How to set up decorative decals=== | ||
What are decals? | What are decals? | ||
: Decals are images glued onto a wall or ground. | : Decals are images glued onto a wall or ground. | ||
: They are used for additional level design and to show weapon damage on surroundings. | : They are used for additional level design and to show weapon damage on surroundings. | ||
: The following steps will show you how to | : The following steps will show you how to place a decorative texture (poster/warning sign/whatever) into a level. | ||
== | ====Step 1 - extending the particle collection==== | ||
* [[XML:BINA/OBJC/PART|Particle collections]] are level specific. | * [[XML:BINA/OBJC/PART|Particle collections]] are level specific. | ||
* <Position> .. Choose a position for your decal. | * <Position> .. Choose a position for your decal. | ||
: '''The | : '''The maximum tolerance distance counts 10 units.''' Let's say the ground height (y) is 45 and the particle is spawned at 55: then this is the maximum tolerance; 56 wouldn't work. | ||
: '''"chr_debug_characters = 1"''' helps you. But note that the y value is not the head | : '''"chr_debug_characters = 1"''' helps you. But note that the y value is not the head or pelvis height -- it is at the lowest point of the feet. | ||
* <Rotation> .. '''see [[#decal_facing|"decal facing"]]''' | * <Rotation> .. '''see [[#decal_facing|"decal facing"]]''' | ||
* <Class> .. this is your [[#step_2_-_creating_BINA3RAP_file|particle file]] | * <Class> .. this is your [[#step_2_-_creating_BINA3RAP_file|particle file]] | ||
* <Tag> .. optional; '''used when you want to activate or deactivate decals or other particle via BSL''' | * <Tag> .. optional; '''used when you want to activate or deactivate decals or other particle via BSL''' | ||
* <Flags> .. "not initially created" flag (2) or nothing (1; 4; 8) | * <Flags> .. "not initially created" flag (2) or nothing (1; 4; 8) | ||
* <XScale> .. Scaling of decal's X dimension on ''individual level'' (you can use the 3RAP's own scaling (<Scale>) for accumulative scaling (this would affect all decals in the collection)) | * <XScale> .. Scaling of decal's X dimension on an ''individual level'' (you can use the 3RAP's own scaling (<Scale>) for accumulative scaling (this would affect all decals in the collection)) | ||
<Object Id="11291" Type="PART"> | <Object Id="11291" Type="PART"> | ||
Line 1,983: | Line 1,980: | ||
=== | =====Decal facing===== | ||
: | : Face the point where you want to have the decal. It's important that your body's facing is accurate, not your head. Then type "chr_debug_characters = 1" into the developer console and you will know the facing. Write it down, compare with the right table and chose your xyz rotation. | ||
: '''PS:''' | : '''PS:''' When it comes to spawning/displaying, the exact rotation is not needed. Oni has a 66 degree tolerance. | ||
: '''PPS:''' <DecalWrapAngle> (in BINA3RAP file) is usually set to 60. For hard edges you might want to increase the value. | : '''PPS:''' <DecalWrapAngle> (in BINA3RAP file) is usually set to 60. For hard edges you might want to increase the value. | ||
Line 2,008: | Line 2,005: | ||
== | ====Step 2 - creating BINA3RAP file==== | ||
* file name in this example: "'''BINA3RAP<font color="#00AA00">decal_particle_name</font>.xml'''" | * file name in this example: "'''BINA3RAP<font color="#00AA00">decal_particle_name</font>.xml'''" | ||
* <Version> .. '''<font color="#FF0000">has to be the same version as your own | * <Version> .. '''<font color="#FF0000">has to be the same version as your own OniSplit, change it if necessary</font> | ||
* <font color="#777777"><CollideWithChars> .. is ignored by decals</font> | * <font color="#777777"><CollideWithChars> .. is ignored by decals</font> | ||
* <HasDecalState>true .. is needed | * <HasDecalState>true .. is needed | ||
Line 2,099: | Line 2,096: | ||
== | ====Step 3 - creating TXMP file==== | ||
* file name in this example: "'''TXMP<font color="#AA00AA">animated_texture</font>.xml'''" | * file name in this example: "'''TXMP<font color="#AA00AA">animated_texture</font>.xml'''" | ||
: Of | : Of course the particle file doesn't have to contain an animated image. It's just meant to remind you that this is an option. | ||
* <Version> .. '''<font color="#FF0000">has to be the same version as your own | * <Version> .. '''<font color="#FF0000">has to be the same version as your own OniSplit, change it if necessary</font> | ||
{| border=0 cellspacing=20 cellpadding=0 align=right | {| border=0 cellspacing=20 cellpadding=0 align=right | ||
Line 2,130: | Line 2,127: | ||
== | ====Step 4 - show or hide decals via BSL==== | ||
Fork "respawnable_decals" in your main function | |||
var bool first = 1; | var bool first = 1; | ||
Line 2,138: | Line 2,135: | ||
chr_debug_characters = 1 | chr_debug_characters = 1 | ||
dmsg "( punch to hide a few decals now )" | dmsg "( punch to hide a few decals now )" | ||
### decal is already | ### decal is already present so we begin with stop function | ||
fork kill_decal | fork kill_decal | ||
} | } | ||
Line 2,169: | Line 2,166: | ||
= | ===How to set up decorative character items=== | ||
Based on geyser's [http://geyser.oni2.net/edition/levels/colony/sillyworld.zip "silly world"] experiment. | Based on geyser's [http://geyser.oni2.net/edition/levels/colony/sillyworld.zip "silly world"] experiment. | ||
Marks, bags, goggles, decorative | Marks, bags, goggles, decorative LSIs, flashlights, and other equipment could individualize characters by using a (BSL-triggered) particle workaround. | ||
== | ====Step 1: ONCC modifications==== | ||
First we need to create a connection to the character. For this, we use the Daodan particle system | First we need to create a connection to the character. For this, we use the Daodan particle system. | ||
<HasDaodanPowers>'''1'''</HasDaodanPowers> | <HasDaodanPowers>'''1'''</HasDaodanPowers> | ||
Now it's enabled for this character. Next we register our item ( | Now it's enabled for this character. Next we register our item (the holding particle) in the ONCP section. | ||
<ONCPParticle> | <ONCPParticle> | ||
<Name>'''super'''_shades</Name> | <Name>'''super'''_shades</Name> | ||
Line 2,187: | Line 2,184: | ||
== | ====Step 2: creating the item files==== | ||
* BINA3RAPsilly_glasses.xml | * BINA3RAPsilly_glasses.xml | ||
: Needed modifications: | : Needed modifications: | ||
Line 2,211: | Line 2,208: | ||
== | ====Step 3: preparing the BSL stuff==== | ||
* BINACJBOCharacter.xml | * BINACJBOCharacter.xml | ||
<Spawn>silly_setup</Spawn> | <Spawn>silly_setup</Spawn> | ||
Line 2,226: | Line 2,223: | ||
{| border=0 cellspacing=20 cellpadding=0 align=right | {| border=0 cellspacing=20 cellpadding=0 align=right | ||
| | | | ||
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/silly_shades.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/silly_shades_TN.png]<br>Karen: "Ready for Matrix. HAR-HAR" | [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/silly_shades.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/silly_shades_TN.png]<br>Karen: "Ready for the Matrix. HAR-HAR." | ||
|} | |} | ||
: silly_setup will be triggered every time a character is spawned with this link in BINACJBOCharacter.xml | : silly_setup will be triggered every time a character is spawned with this link in BINACJBOCharacter.xml | ||
: Only AI would need chr_lock_active. | : Only the AI would need chr_lock_active. | ||
: chr_super becomes disabled again to prevent other Daodan effects (in case our character | : chr_super becomes disabled again to prevent other Daodan effects (in case our character has a chenille or other visuals). We don't have to worry about the item, its lifetime was set to 0 (infinity). ("chr_super 0" only hides the particle, it doesn't kill it.) | ||
: | : | ||
Line 2,240: | Line 2,237: | ||
'''2''' corresponds to <Start> tag and '''3''' corresponds to <Stop> tag in BINA3RAPsilly_shades.xml | '''2''' corresponds to <Start> tag and '''3''' corresponds to <Stop> tag in BINA3RAPsilly_shades.xml | ||
This can ''switch on and off'' | This can ''switch the item on and off''. Other effects could be triggered by the free remaining numbers. A collection of events and their numbers can be seen [[XML:BINA/OBJC/PART|HERE]]. | ||
== | ====Extra demo==== | ||
''For all Gundam Seed fans out there: Phase Shift shades.'' ^_^ | ''For all Gundam Seed fans out there: Phase Shift shades.'' ^_^ | ||
Nope, the texture of an object cannot be replaced by another. But by using three different pairs of shades, we can create this illusion. There are blue shades. A ''pair'' that uses an animated texture. And a red pair. The animated pair is only temporarily used. [http://www.youtube.com/watch?v=XbOb0i5StDk Here's a vid.] | |||
func spawn_karen { | func spawn_karen { | ||
chr_super karen 1 | chr_super karen 1 | ||
### all three shades | ### all three shades particles created | ||
sleep 2 | sleep 2 | ||
### now but we need to hide them | ### now but we need to hide them |