XML:BINA/OBJC/DOOR: Difference between revisions

m
Use capitalized file name for console's TXMP names
m (never noticed that ssg even listed the locklights)
m (Use capitalized file name for console's TXMP names)
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=[[OBD:BINA/OBJC/DOOR|BINA/OBJC/DOOR]]: doors=
{{XML_OBJC_Header | type=DOOR | prev=CMBT | next=FLAG | name=Door spawn list }}
'''general information'''
* '''BINACJBODOOR.oni''' is level specific. (It can be found in edition/GameDataFolder/level''XX''_... )
* See [[XML basic tutorial|HERE]] if you don't know how to convert an oni file into XML and vice versa.
* All original doors and it's locklights can be seen [http://ssg.oni2.net/subfold/doors/doors.htm HERE.]


__TOC__


'''XML structure'''
 
===general information===
* The xml code on this page was tested with onisplit version 0.9.61.0 and 0.9.82.0
* '''BINACJBODOOR.oni''' is level specific. (It can be found in AE/AEInstaller/vanilla/level'''X'''_Final.dat)
* All original doors and their locklights can be seen [http://ssg.oni2.net/subfold/doors/doors.htm HERE.]
 
 
===file structure===
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni Version="0.9.37.0">
  <Oni>
    <ObjectCollection>
    <Objects>
         '''''[...]'''''
         '''''[...]'''''
     </ObjectCollection>
     </Objects>
  </Oni>
  </Oni>




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


'''example'''
'''example'''
         <Object Id="2467" Type="DOOR">
         '''<font color="#0A0"><DOOR Id="7233"></font>'''
             <Header>
             <Header>
                 <Flags>9</Flags>
                 <Flags>Gunk</Flags>
                 <Position>-734 45 -172</Position>
                 <Position>-652 0 -753</Position>
                 <Rotation>0 0 0</Rotation>
                 <Rotation>0 0 0</Rotation>
             </Header>
             </Header>
             <OSD>
             <OSD>
                 <Class>CM_3</Class>
                 <Class>wh_door1dbl</Class>
                 <DoorId>2</DoorId>
                 <DoorId>1</DoorId>
                 <KeyId>0</KeyId>
                 <KeyId>0</KeyId>
                 <Flags>132</Flags>
                 <Flags>InitialLocked InDoorFrame DoubleDoor</Flags>
                 <nowiki><Center>-734 60 -172</Center></nowiki>
                 <nowiki><Center>-652 16.5 -753</Center></nowiki>
                 <SquaredActivationRadius>900</SquaredActivationRadius>
                 <SquaredActivationRadius>900</SquaredActivationRadius>
                 <Texture1></Texture1>
                 <Texture1></Texture1>
Line 35: Line 39:
                 <Events>
                 <Events>
                     <ActivateTurret TargetId="1" />
                     <ActivateTurret TargetId="1" />
                    <Script Function="door_test" />
                 </Events>
                 </Events>
             </OSD>
             </OSD>
         </Object>
         '''<font color="#0A0"></DOOR></font>'''




### in BSL file
===tags===
  func door_test
{| class="wikitable" width=100%
!width=280px| tag
!width=60px| type
! description
|-
| <?xml version="1.0" encoding="utf-8"?>
| float, flag
| Don't change this.
|-
| <Oni>
| -
|
|-
| <Objects>
| -
|
|-
| <DOOR Id="...">
| int32
| Use any number. No need to be unique. -- For level import use <Door>.
|-
| <Header>
| -
|
|-
| <Flags>
| flag
| Object flags. Used in the past, ignore them. -- Optional tag for level import.
|-
| <Position>
| float x3
| X Y Z position. For original doors use Y=0 if ground plane is 0. -- Optional tag for level import but should be used in any case.
|-
| <Rotation>
| float x3
| X Y Z rotation. chr_debug_characters = 1 shows the player's facing which can be used for door's Y value. X and Z should be 0. -- Optional tag for level import.
|-
| <OSD>
| -
|
|-
|valign="top"| <Class>
|valign="top"| char[63]
| <font color="#777777">DOOR</font>file<font color="#777777">.oni</font> <font color="#777777">(don't use file prefix/suffix)</font> For level import use absolute or relative file path, e.g. ''doors/TCdouble.oni''
|-
| <DoorId>
| int16
| Can be used with [http://ssg.oni2.net/commands.htm#door BSL commands]. -- Optional tag for level import but should be used in any case.
|-
| <KeyId>
| int16
| Ignore it. -- Optional tag for level import.
|-
|valign="top"| <Flags>
|valign="top"| flag
| Optional tag for level import.
: None
: InitialLocked
:: door is initially locked (at level load or after calling reset_mechanics)
: InDoorFrame
:: ? (no visible effect)
: Manual
:: require player to press '''action''' to open door
: DoubleDoor
:: a door with two parts
: Mirror
:: mirrors door along its Z axis
: OneWay
:: one side locked, other side unlocked
: Reverse
:: one side unlocked, other side locked
: Jammed
:: freeze door (can't open/close)
: InitialOpen
|-
|valign="top"| <nowiki><Center></nowiki>
|valign="top"| float x3
| X Y Z. <nowiki><Center></nowiki> Y is usually 15 units above door's <Position> Y. -- Optional tag for level import but should be used in any case.
|-
|valign="top"| <SquaredActivationRadius>
|valign="top"| float
| Optional tag for level import; default value is 900.
|-
|valign="top"| <Texture1>
|valign="top"| char[63]
| <font color="#777777">TXMP</font>file<font color="#777777">.oni</font> <font color="#777777">(don't use file prefix/suffix)</font> Used to replaces the doors default texture coming with the M3GM. -- Optional tag for level import.
'''Use capitalized file name for this TXMP.'''
|-
| <Texture2>
| char[63]
| <font color="#777777">TXMP</font>file<font color="#777777">.oni</font> <font color="#777777">(don't use file prefix/suffix)</font> Can be used with double doors.  -- Optional tag for level import.
'''Use capitalized file name for this TXMP.'''
|-
| <Events>
| int16
| You can use multiple events. -- Optional tag for level import.
|-
|valign="top"| <Script Function="call_this_BSL_function" />
|valign="top"| char[32]
| Name of BSL function. For example if you use "call_this_BSL_function" here then write in BSL file:
  ''func call_this_BSL_function
  {
  {
dmsg "[r.door test]"
      dmsg "hi"
dmsg "marked turret is set active and BSL function is triggered"
}''
dmsg "by any character which comes into specified radius"
|-
}
| <ActivateTurret TargetId="''Id''" />
 
| int16
 
|
'''flags'''
|-
DEC   HEX    description
| <DeactivateTurret TargetId="''Id''" />
1 = 01  = "initially locked" (at level load or after calling reset mechanics)
| int16
2 = 02  = unknown; never used
|
4 = 04  = unknown; probably "locked"
|-
8 = 08  = unknown; never used
| <ActivateConsole TargetId="''Id''" />
16 = 10  = require player to press action to open the door
| int16
32 = 20  = unknown; never used
|
64 = 40  = unknown; never used
|-
128 = 80  = double door
| <DeactivateConsole TargetId="''Id''" />
256 = 0001 = "mirror door" (mirrored along door's Z axis)
| int16
512 = 0002 = one way door (one side locked, other side unlocked)
|
1024 = 0004 = reverse of the one way door (now the other side is locked)
|-
2048 = 0008 = unknown; never used
| <ActivateAlarm TargetId="''Id''" />
4096 = 0010 = unknown; never used
| int16
8192 = 0020 = unknown; never used
|
16384 = 0040 = unknown; never used
|-
32768 = 0080 = unknown; never used
| <DeactivateAlaram TargetId="''Id''" />
| int16
|
|-
| <ActivateTrigger TargetId="''Id''" />
| int16
|
|-
| <DeactivateTrigger TargetId="''Id''" />
| int16
|
|-
| <LockDoor TargetId="''Id''" />
| int16
|
|-
| <UnlockDoor TargetId="''Id''" />
| int16
|
|}




'''events'''
{{XML}}
: <Script Function="''calling_this_BSL_function''" />
: <ActivateTurret TargetId="''Id''" />
: <DeactivateTurret TargetId="''Id''" />
: <ActivateConsole TargetId="''Id''" />
: <DeactivateConsole TargetId="''Id''" />
: <ActivateAlarm TargetId="''Id''" />
: <DeactivateAlaram TargetId="''Id''" />
: <ActivateTrigger TargetId="''Id''" />
: <DeactivateTrigger TargetId="''Id''" />
: <LockDoor TargetId="''Id''" />
: <UnlockDoor TargetId="''Id''" />
489

edits