XML:BINA/OBJC/TRIG: Difference between revisions

From OniGalore
< XML:BINA‎ | OBJC
Jump to navigation Jump to search
(reply)
(.)
Line 1: Line 1:
{{Table}}
'''general notes'''
{{OBDth}}
* See [[XML basic tutorial|HERE]] if you don't know how to convert an oni file into XML and vice versa.
{{OBDtr| 0x75 | int16    |EBEBEB| 00 00      | 0         | time of interruption interval in frames }}
* See [[OBD_talk:BINA/OBJC|HERE]] if you are searching for more general information such as how to handle object coordinates.
{{OBDtr| 0x77 | int16    |8C8CCC| 00 00      | 0         | time of interruption in frames }}
* The trigger collection is level specific.
 
 
'''BSL support'''
: <font color="#777777">command - description - example</font>
* marketing_line_off - turns the laser line off - marketing_line_off = 1
* trig_activate trigger_id:int - activates a trigger - trig_activate 2
* trig_deactivate trigger_id:int - deactivates a trigger - trig_deactivate 2
* trig_hide trigger_id:int - hides a trigger - trig_hide 91
* trig_show trigger_id:int - shows a trigger - trig_show 91
* trig_speed trigger_id:int volume:float - sets a triggers speed - trig_speed 514 .15
* trig_reset trigger_id:int - resets a trigger to non-triggered state - trig_reset 91
 
 
'''XML structure'''
<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.28.0">
    <ObjectCollection>
        '''''[...]'''''
    </ObjectCollection>
</Oni>
 
'''''[...]''''' means at least one trigger. Paste all trigger data into there (this includes '''<font color="#0A0"><Object ...></font>''' and '''<font color="#0A0"></Object></font>''' tag).
 
'''example'''
{| border=0 cellspacing=20 cellpadding=0 align=right
|
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/trigger.jpg http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/trigger_preview.jpg]
|}
|}
Dox, could you explain the effect of these two fields in more detail? The current description is not clear enough. --[[User:Geyser|geyser]] 20:03, 27 October 2008 (CET)


Okay, here's a fully example. When you set 360 (at 0x75) and 120 (at 0x77) then the laser get disabled after 6 seconds for 2 seconds, then it loops. --[[User:Paradox-01|Paradox-01]] 21:42, 27 October 2008 (CET)
        '''<font color="#0A0"><Object Id="8136" Type="TRIG"></font>'''
            <Header>
                <Flags>0</Flags>
                <Position>-445 68 -1362</Position>
                <Rotation>270 8.65141646E-06 180.000015</Rotation>
            </Header>
            <OSD>
                <Class>trigger_long</Class>
                <TriggerId>1</TriggerId>
                <Flags>44</Flags>
                <LaserColor>0 0 255</LaserColor>
                <StartPosition>0</StartPosition>
                <Speed>0</Speed>
                <EmitterCount>3</EmitterCount>
                <Offset_0075>0</Offset_0075>
                <Offset_0077>0</Offset_0077>
                <Events>
                    <ActivateTurret TargetId="1" />
                </Events>
            </OSD>
        '''<font color="#0A0"></Object></font>'''
 
'''tags'''
* <Flags> : unknown
* <Position> : (trigger is spawned at this xyz-position)
* <Rotation> : (trigger has xyz-rotation (in degrees))
* <Class>
:: trigger_arc
:: trigger_circle
:: trigger_evilbrain
:: trigger_long
:: trigger_long4x
:: trigger_long4xzag
:: trigger_rectangle
:: trigger_sb3A
:: trigger_sb3B
:: trigger_short
:: (link by name to the [[TRIG]] instance (trigger class), which holds the [[M3GM]] of the rail and links to [[TRGE]] (laser emitter class) and [[OBAN]] (animation of the emitters))
:: (Screenshot of each would be good.)
* <TriggerId> : (used by BSL commands)
* <Flags> :
:: 4 - active?
:: 8 - initial active
:: 10 - reverse
:: 20 - pingpong
:: 40 - unknown
:: 80 - unknown
* <LaserColor> : ([[wikipedia:RGB_color_model#The_24-bit_RGB_representation|RGB]] range, e.g. <LaserColor>255 0 77</LaserColor>)
* <StartPosition> : (float value; start position of the trigger in the rail; range from 0 (bottom) to 1 (top) in connection to the spawn point of the trigger (spawn point = bottom))
* <Speed> : (float value; ''reference'': 0 means no movement, 1 is slow, and 2 is fast)
* <EmitterCount> : (number of laser emitters in one trigger rail)
* <Offset_0075> : (laser is on for a number of frames you set here)
* <Offset_0077> : (laser is off for a nubmer of frames you set here)
::(example: when you set 360 (at offset 0x75) and 120 (at offset 0x77) then the laser gets disabled after 6 seconds for 2 seconds, then loops; note that the laser will be off all if you set 0x75 to 0 and 0x77 to a number bigger than 0)
* <Events>
:* <Script Function="''BSL_function''" /> : (calls ''BSL_function'' (continuously as long as causer stays in laser))
:* <ActivateTurret TargetId="''ID''" /> : (activates a turret with id ''ID'' (integer decimal number))
:: (You can have more than one and different event types - functions and turrets - at same time.)

Revision as of 11:16, 3 January 2009

general notes

  • See HERE if you don't know how to convert an oni file into XML and vice versa.
  • See HERE if you are searching for more general information such as how to handle object coordinates.
  • The trigger collection is level specific.


BSL support

command - description - example
  • marketing_line_off - turns the laser line off - marketing_line_off = 1
  • trig_activate trigger_id:int - activates a trigger - trig_activate 2
  • trig_deactivate trigger_id:int - deactivates a trigger - trig_deactivate 2
  • trig_hide trigger_id:int - hides a trigger - trig_hide 91
  • trig_show trigger_id:int - shows a trigger - trig_show 91
  • trig_speed trigger_id:int volume:float - sets a triggers speed - trig_speed 514 .15
  • trig_reset trigger_id:int - resets a trigger to non-triggered state - trig_reset 91


XML structure

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

[...] means at least one trigger. Paste all trigger data into there (this includes <Object ...> and </Object> tag).

example

trigger_preview.jpg

       <Object Id="8136" Type="TRIG">
           <Header>
               <Flags>0</Flags>
               <Position>-445 68 -1362</Position>
               <Rotation>270 8.65141646E-06 180.000015</Rotation>
           </Header>
           <OSD>
               <Class>trigger_long</Class>
               <TriggerId>1</TriggerId>
               <Flags>44</Flags>
               <LaserColor>0 0 255</LaserColor>
               <StartPosition>0</StartPosition>
               <Speed>0</Speed>
               <EmitterCount>3</EmitterCount>
               <Offset_0075>0</Offset_0075>
               <Offset_0077>0</Offset_0077>
               <Events>
                   <ActivateTurret TargetId="1" />
               </Events>
           </OSD>
       </Object>

tags

  • <Flags> : unknown
  • <Position> : (trigger is spawned at this xyz-position)
  • <Rotation> : (trigger has xyz-rotation (in degrees))
  • <Class>
trigger_arc
trigger_circle
trigger_evilbrain
trigger_long
trigger_long4x
trigger_long4xzag
trigger_rectangle
trigger_sb3A
trigger_sb3B
trigger_short
(link by name to the TRIG instance (trigger class), which holds the M3GM of the rail and links to TRGE (laser emitter class) and OBAN (animation of the emitters))
(Screenshot of each would be good.)
  • <TriggerId> : (used by BSL commands)
  • <Flags> :
4 - active?
8 - initial active
10 - reverse
20 - pingpong
40 - unknown
80 - unknown
  • <LaserColor> : (RGB range, e.g. <LaserColor>255 0 77</LaserColor>)
  • <StartPosition> : (float value; start position of the trigger in the rail; range from 0 (bottom) to 1 (top) in connection to the spawn point of the trigger (spawn point = bottom))
  • <Speed> : (float value; reference: 0 means no movement, 1 is slow, and 2 is fast)
  • <EmitterCount> : (number of laser emitters in one trigger rail)
  • <Offset_0075> : (laser is on for a number of frames you set here)
  • <Offset_0077> : (laser is off for a nubmer of frames you set here)
(example: when you set 360 (at offset 0x75) and 120 (at offset 0x77) then the laser gets disabled after 6 seconds for 2 seconds, then loops; note that the laser will be off all if you set 0x75 to 0 and 0x77 to a number bigger than 0)
  • <Events>
  • <Script Function="BSL_function" /> : (calls BSL_function (continuously as long as causer stays in laser))
  • <ActivateTurret TargetId="ID" /> : (activates a turret with id ID (integer decimal number))
(You can have more than one and different event types - functions and turrets - at same time.)