XML:ONCC: Difference between revisions

51 bytes removed ,  10 October 2021
partial copy-edit; corrections to shadow section
m (link fix)
(partial copy-edit; corrections to shadow section)
Line 1: Line 1:
{{XML_File_Header | prev=OFGA | type=ONCC | next=ONCV | name=Oni Character Class}}
{{XML_File_Header | prev=OFGA | type=ONCC | next=ONCV | name=Oni Character Class}}


==general information==
==General information==
* The xml code on this page is compatible with onisplit '''v0.9.61.0'''
* The XML on this page is compatible with OniSplit '''v0.9.61.0'''.
* ONCP, ONIA, OBPI and OBPM are part of '''ONCC*.oni''' files.
* ONCP, ONIA, OBPI and OBPM are part of '''ONCC*.oni''' files.
* ONCC files can be found in AE/AEInstaller/vanilla/level0_Final.dat
* ONCC files are global; they can be found in AE/AEInstaller/vanilla/level0_Final.dat.
* Things that still need deeper explanation:
* Things that still need deeper explanation:
: '''<DamageFactors>'''
: '''<DamageFactors>'''
Line 10: Line 10:
: <AutoFreezeConstants>
: <AutoFreezeConstants>
: <LODConstants>
: <LODConstants>
: Loser's warehouse ninja that can follow player onto crates


==<AirConstants>==
==<AirConstants>==
;Units:times are in frames
;Units
:heights are in world units
*Times are in frames
:velocities are in world units per frames
*Heights are in world units
:accelerations are in world units per frames squared
*Velocities are in world units per frames
;Downwards velocity: could correspond to the steady push experienced when neither jumping nor falling
*Accelerations are in world units per frames squared
:would be roughly equivalent to the starting velocity of a fall
:although the value .55 seems right, the "sinking" seems to be hardcoded now
;Gravity timer:Seems to be hardcoded now (could be the time until gravity switches on)
;Jetpack timer:You can press JUMP multiple times during the time window [http://mods.oni2.net/node/83 (quite fun!)]
;Falling height: let FH1 be <MaxNoDamageFallingHeight>
:let FH2 be <MaxDamageFallingHeight>
:let BH be the base health of the character
:let FH be the actual falling height
:then, if FH > FH2, the character is killed
:if FH < FH1, the character takes no damage
:if FH1 < FH < FH2, the character takes damage (FH - FH1) / (FH2 - FH1) * BH
 


{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
!width=150px| XML tag
!width=150px| XML tag
!width=120px| content type
!width=120px| Content type
! description
! Description
|-
|-
|<FallGravity>
|<FallGravity>
| float
| float
| downwards velocity? (always 0.55)
| Downwards velocity? Always 0.55. It would be roughly equivalent to the starting velocity of a fall. Although the value 0.55 seems right, the "sinking" seems to be hardcoded now.
|-
|-
| <JumpGravity>
| <JumpGravity>
| float
| float
| downward gravity acceleration
| Downward gravity acceleration
|-
|-
| <JumpStartVelocity>
| <JumpStartVelocity>
| float
| float
| starting velocity for a simple (tap) JUMP
| Starting velocity for a simple jump (tapping JUMP)
|-
|-
| <MaxVelocity>
| <MaxVelocity>
| float
| float
| limit velocity for jumping and gravity flight
| Maximum velocity for jumping and falling
|-
|-
| <JetpackAcceleration>
| <JetpackAcceleration>
| float
| float
| upward acceleration (jetpack) if you hold JUMP  
| Upward acceleration (jetpack) if you hold JUMP  
|-
|-
| <FramesFallGravity>
| <FramesFallGravity>
| int16
| int16
| gravity timer? (always 7)
| Gravity timer (the time until gravity switches on)? Always 7. Seems to be hardcoded now.
|-
|-
| <JetpackTimer>
| <JetpackTimer>
| int16
| int16
| time during which you can use the jetpack
| Time during which you can use the jetpack. [http://mods.oni2.net/node/83 This mod] allows you to press JUMP multiple times during the time window (quite fun!).
|-
|-
| <MaxNoDamageFallingHeight>
| <MaxNoDamageFallingHeight>
| float
| float
| maximal falling height without damage
| Maximum falling height without damage (see below)
|-
|-
| <MaxDamageFallingHeight>
| <MaxDamageFallingHeight>
| float
| float
| maximal falling height with damage
| Maximum falling height with damage
:Let FH1 be <MaxNoDamageFallingHeight>
:Let FH2 be <MaxDamageFallingHeight>
:Let BH be the base health of the character
:Let FH be the actual falling height
:Then, if FH > FH2, the character is killed
:If FH < FH1, the character takes no damage
:If FH1 < FH < FH2, the character takes damage (FH - FH1) / (FH2 - FH1) * BH
|}
|}


==<ShadowConstants>==
==<ShadowConstants>==
{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
!width=150px| XML tag
!width=150px| XML tag
!width=120px| content type
!width=120px| Content type
! description
! Description
|-
|-
| <Texture>
| <Texture>
Line 87: Line 79:
| <MaxHeight>
| <MaxHeight>
| float
| float
| height where the shadow fades out completely
| Height where the diameter of the shadow shrinks to <SizeMin>
|-
|-
| <FadeHeight>
| <FadeHeight>
| float
| float
| height where the diameter of the shadow decreases and the shadow fades out half
| Height range over which the diameter of the shadow decreases from <SizeMax> to <SizeFade> and the shadow starts to fades out from <AlphaMax> to <AlphaFade>
|-
|-
| <SizeMax>
| <SizeMax>
| float
| float
| height where the diameter of the shadow decreases
| Maximum diameter of the shadow
|-
|-
| <SizeFade>
| <SizeFade>
| float
| float
| height where the diameter of the shadow decreases
| Diameter that the shadow shrinks to when <FadeHeight> is reached
|-
|-
| <SizeMin>
| <SizeMin>
| float
| float
| height where the diameter of the shadow decreases
| Minimum diameter of the shadow
|-
|-
| <AlphaMax>
| <AlphaMax>
| int16
| int16
| transparency of the shadow for the first part of a jump
| Starting transparency of the shadow as the character rises towards <FadeHeight>
|-
|-
| <AlphaFade>
| <AlphaFade>
| int16
| int16
| transparency of the shadow for the second part of a jump
| Starting transparency of the shadow when the character begins to get above <FadeHeight>
|}
|}


Line 586: Line 578:
| <Variant>
| <Variant>
| link
| link
| <font color="#777777">ONCV</font>file<font color="#777777">.oni</font>, which defines variants and upgrades; see [[XML:ONCV]] for explanation
| <font color="#777777">ONCV</font>file<font color="#777777">.oni</font>, which defines variants and upgrades; see [[XML:ONCV]] for explanation  
|-
|-
| <Particles>
| <Particles>