AE:Glass: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(oops :P)
m (/++cat)
Line 216: Line 216:
==Flagging environment as glass==
==Flagging environment as glass==
Getting there too... Hope to find the flag soon ^^
Getting there too... Hope to find the flag soon ^^
[[Category:AE to-do]]
[[Category:All AE mods]][[Category:Finished AE mods]]{{update}}

Revision as of 23:36, 28 July 2009

Oni ni Kanabô
ONK.png

This is for various modifications of Oni's glass and its behaviour.

Glass-breaking combos will be covered here as a specific case of melee modding
Overview

We all know most of Oni's glass can be shot. However :

  • glass can not be broken by combos or thrown/falling enemies
  • glass can not be broken by some weapons (most annoyingly, the Scram Cannon)
  • not all see-through surfaces are flagged as glass : they can't be shot

Ways of improving the above are :

  • to affect glass-breaking particles to TRAM so that specific animations can break glass
  • to modify specific projectiles (e.g. Scram missiles) so that they can break glass
  • to track down specific parts of the environment, and flag them as (breakable) glass

Deadly glass

Description
Glass shards can be modified so that they hurt nearby characters when falling.
See it in action
Google video by EdT
Get it as a .oni file
http://gumby.oni2.net/AE/oni%20files/glass/BINA3RAPglass_shard.oni (already in AE, does 8 damage)
Get the XML version
http://gumby.oni2.net/AE/oni%20files/glass/XML/BINA3RAPglass_shard.xml
Do it yourself
  1. Extract the BINA3RAPglass_shard.oni file as .xml.
  2. Add the part in red
  3. Change the "8" in <Damage>8</Damage> to how much damage the glass should do
  4. Convert the xml back into a .oni file and import it back into your game data

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.32.0">
   <Particle Name="glass_shard">
       <Options>
           <Lifetime>10</Lifetime>
           <DisableDetailLevel>Never</DisableDetailLevel>
           <Decorative>true</Decorative>
           <CollideWithWalls>true</CollideWithWalls>
           <CollideWithChars>true</CollideWithChars>
           <InitiallyHidden>false</InitiallyHidden>
           <DrawAsSky>false</DrawAsSky>
           <DontAttractThroughWalls>false</DontAttractThroughWalls>
           <ExpireOnCutscene>false</ExpireOnCutscene>
           <DieOnCutscene>false</DieOnCutscene>
           <LockPositionToLink>false</LockPositionToLink>
           <CollisionRadius>0</CollisionRadius>
           <AIDodgeRadius>0</AIDodgeRadius>
           <AIAlertRadius>0</AIAlertRadius>
           <FlyBySoundName />
       </Options>
       <Properties>
           <HasVelocity>true</HasVelocity>
           <HasOrientation>true</HasOrientation>
           <HasPositionOffset>false</HasPositionOffset>
           <HasAttachmentMatrix>false</HasAttachmentMatrix>
           <HasUnknown>false</HasUnknown>
           <HasDecalState>false</HasDecalState>
           <HasTextureStartTick>true</HasTextureStartTick>
           <HasTextureTick>true</HasTextureTick>
           <HasDamageOwner>false</HasDamageOwner>
           <HasContrailData>false</HasContrailData>
           <HasLensFlareState>false</HasLensFlareState>
           <HasAttractor>false</HasAttractor>
           <HasCollisionCache>false</HasCollisionCache>
       </Properties>
       <Appearance>
           <DisplayType>Flat</DisplayType>
           <TexGeom>glass_shard</TexGeom>
           <Invisible>false</Invisible>
           <IsContrailEmitter>false</IsContrailEmitter>
           <ScaleToVelocity>false</ScaleToVelocity>
           <Scale>2.8</Scale>
           <UseSeparateYScale>false</UseSeparateYScale>
           <YScale>1</YScale>
           <Rotation>0</Rotation>
           <Alpha>1</Alpha>
           <XOffset>0</XOffset>
           <XShorten>0</XShorten>
           <UseSpecialTint>false</UseSpecialTint>
           <Tint>128 128 128</Tint>
           <FadeOutOnEdge>false</FadeOutOnEdge>
           <OneSidedEdgeFade>false</OneSidedEdgeFade>
           <EdgeFadeMin>0</EdgeFadeMin>
           <EdgeFadeMax>0</EdgeFadeMax>
           <MaxContrailDistance>0</MaxContrailDistance>
           <LensFlare>false</LensFlare>
           <LensFlareDistance>0</LensFlareDistance>
           <LensFlareFadeInFrames>0</LensFlareFadeInFrames>
           <LensFlareFadeOutFrames>0</LensFlareFadeOutFrames>
           <DecalFullBrightness>false</DecalFullBrightness>
           <MaxDecals>100</MaxDecals>
           <DecalFadeFrames>60</DecalFadeFrames>
           <DecalWrapAngle>60</DecalWrapAngle>
       </Appearance>
       <Attractor>
           <Target>None</Target>
           <Selector>Distance</Selector>
           <Class />
           <MaxDistance>150</MaxDistance>
           <MaxAngle>30</MaxAngle>
           <AngleSelectMin>3</AngleSelectMin>
           <AngleSelectMax>20</AngleSelectMax>
           <AngleSelectWeight>3</AngleSelectWeight>
       </Attractor>
       <Variables>
           <Float Name="rotate_x">
               <BellCurve Mean="0" StdDev="50" />
           </Float>
           <Float Name="rotate_z">
               <BellCurve Mean="0" StdDev="50" />
           </Float>
       </Variables>
       <Emitters />
       <Events>
           <Update>
               <MoveLine />
               <MoveGravity>
                   <Fraction>0.4</Fraction>
               </MoveGravity>
               <RotateZ>
                   <Space>0</Space>
                   <Rate>rotate_z</Rate>
                   <RotateVelocity>0</RotateVelocity>
               </RotateZ>
               <RotateX>
                   <Space>0</Space>
                   <Rate>rotate_x</Rate>
                   <RotateVelocity>0</RotateVelocity>
               </RotateX>
           </Update>
           <HitWall>
               <ImpulseSound>
                   <Sound>glass_small</Sound>
               </ImpulseSound>
               <CollisionEffect>
                   <Effect>glass_hit</Effect>
                   <WallOffset>0.01</WallOffset>
                   <Orientation>2</Orientation>
                   <Attach>1</Attach>
               </CollisionEffect>
               <Die />
           </HitWall>
           <HitCharacter>
               <CollisionEffect>
                   <Effect>glass_hit</Effect>
                   <WallOffset>0.01</WallOffset>
                   <Orientation>2</Orientation>
                   <Attach>1</Attach>
               </CollisionEffect>
               <DamageChar>
                   <Damage>8</Damage>
               </DamageChar>
               <Die />
           </HitCharacter>
           <Lifetime>
               <FadeOut>
                   <TimeToDie>1</TimeToDie>
               </FadeOut>
           </Lifetime>
       </Events>
   </Particle>
</Oni>

If you want to get really fancy, try changing <Damage>8</Damage> into something like...

   <Damage>
       <Random Min="8" Max="10" />
   </Damage>

This will make glass do random damage between 8 and 10 health points.



Glass-breaking combos

Basic hack description
The glass can be broken by kicks after modifying the 3RAPh2h_dust_p01.BINA file.
See it in action
A few movies by geyser (WMV) :
A snapshot by EdT :

ss8.jpg

Get it as a patch
No link so far, but there will be downloadable particle files (trails rather than dust) as well as TRAM particle tracks specifically adapted for them.
Do it yourself (basic hack using the dust spawned by some combos)
  • Open level0_Final.dat with OniUnPacker
  • Use the Binary.raw editor to select the file 3RAPh2h_dust_p01.BINA
  • Look at the chunk between 0x550 and 0x6F8
  • Go to the 0x00 at 0x550 (0x00=0 is the ID of the "Linear Change" event)
    • change it to 0x1E (0x1E=30 is the ID of the "Glass Charge" event)
  • Go to the 0x00 at 0x0x634
    • change it to 0x03 (type for the "radius" parameter of "Glass Charge" : float)
  • Go to the 0x00000000 at 0x0x638
    • change it to 0x00000040 or 0x00000041 (value for the "radius" parameter of "Glass Charge" : 2.0 or 8.0)
NOTE TO EXPERTS : we've left the first argument of set 2 ("blast-vel" for "Glass Charge") as is. "Linear Change"s "rate" was of the right type (float), and the value (6.0) is nothing extreme.
Look at the second variable of h2h_dust_p01 : it's the 0x34=52 byte chunk between 0x340 and 0x374.
There's the name ("alpha") right at the start. The initialisation value you can see at 0x35C (it's a float, since the type at 0x358 is 0x03).
If we just make this float 0.125 (make the 0x00000000 at 0x35C a 0x0000003E) we'll have 12.5%-transparent dust right away.

The changes will look like this:

breakglass.jpg




Glass-breaking Scram Cannon

Getting there... that's almost a weapon-modding issue.




Flagging environment as glass

Getting there too... Hope to find the flag soon ^^

Aged parchment-60px.jpg

This page contains information that is out of date.
Please update this information to reflect where the community is at today.