XML:BINA/OBJC/CONS: Difference between revisions

From OniGalore
< XML:BINA‎ | OBJC
Jump to navigation Jump to search
m (link fix)
(xml tags table)
Line 2: Line 2:


===general information===
===general information===
* The xml code on this page is based on onisplit '''v0.9.61.0'''
* The xml code on this page was tested with onisplit version 0.9.61.0 and 0.9.82.0
* Y value of "chr_debug_characters = 1" doesn't need to be changed.
* Y value of "chr_debug_characters = 1" doesn't need to be changed.
* Facing (Y rotation) needs to be changed by 180 degrees.
* Facing (Y rotation) needs to be changed by 180 degrees.
* This console spawning doesn't include console geometry, see screenshot.
* This console ''spawning'' doesn't include console geometry (see screenshot) unless it's done via [[XML:ONLV|ONLV]] level import.
* '''BINACJBOConsole.oni''' is level specific. (It can be found in edition/GameDataFolder/level''XX''_... )
* '''BINACJBOConsole.oni''' is level specific. (It can be found in edition/GameDataFolder/level''XX''_... )
* All consoles can be seen [http://ssg.oni2.net/subfold/consoles/ HERE.]
* All consoles can be seen [http://ssg.oni2.net/subfold/consoles/ HERE.]
Line 53: Line 53:


===tags===
===tags===
* <Flags> :
{| class="wikitable" width=100%
: Locked (means what in this case?) (hex: 1)
!width=280px| tag
: Gunk (means what?) (hex: 8)
!width=60px| type
* <Position> : (console is spawned at this xyz-position)
! description
* <Rotation> : (console is spawned with this xyz-rotation (in degrees))
|-
* <Class>: console0 / console_alarm / console_data / [[Console|?]]
| <?xml version="1.0" encoding="utf-8"?>
* <ConsoleId> : (used by BSL commands like "console_deactivate ''ID''")
| float, flag
* <Flags> :  
| Don't change this.
:HEX=Dec/Flag
|-
:00 = (empty)(not active)
| <Oni>
:01 = 1 (unknown)
| -
:02 = 2 (unknown)
|
:04 = 4 (unknown)
|-
:08 = '''InitialActive'''
| <Objects>
:<font color="#777">09 = 9 (*)</font>
| -
:10 = 16 (unknown)
|
:20 = '''Punch''' (KONOKOconsole_punch.TRAM .. WTF O_o Seems to be a KONCOMcomb_p copy but slightly slower; I think it was used in a beta to crash the console via character-environment collision, shall we try to get it back?)
|-
:28 = InitialActive Punch
| <CONS Id="...">
:40 = '''IsAlarm'''
| integer
:80 = 128 (unknown)
| Use any number. No need to be unique.
:<font color="#777">C0 = 192 (*)</font>
|-
:<font color="#777">EE = 238 (*)</font>
| <Header>
: * not tested, might screw everything, was only set to test the XML export
| -
:Multiple flags:
|
::known flag and unknown flag are extracted as decimal number added together (see 9)
|-
::known flags are extracted as readable flags, separated by a space sign (see 28)
| <Flags>
| flag
| Gunk flags. Appears useless.
|-
| <Position>
| float x3
| X Y Z position. For original consoles use Y=0 if ground plane is 0.
|-
| <Rotation>
| float x3
| X Y Z rotation. chr_debug_characters = 1 shows the player's facing which can be used for console's Y value. X and Z should be 0.
|-
| <OSD>
| -
|
|-
|valign="top"| <Class>
|valign="top"| link
| Original consoles:
: console_alarm
: console_data
: console0
: console_small_wu_roof
 
For level import via [[XML:ONLV|xml master file]] use absolute/relative file path, e.g. ''consoles/console_data.oni''
|-
| <ConsoleId>
| integer
| Can be used with BSL commands like "console_deactivate ''ID''".
|-
|valign="top"| <Flags>
|valign="top"| flag
|
: None
:: <Flags></Flags> also works; console will appear disabled.
: InitialActive
:: Console will appear enabled.
: Punch
:: Was used for TRAMKONOKOconsole_punch.
: IsAlarm
:: Alarm console. Used with alarm groups in CHAR.
|-
|valign="top"| <InactiveTexture>
|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> Image for disabled console. Examples:
 
_con_ALARM_SLEEP / _con_USED / _con_used / _con_INACTIVE
|-
|valign="top"| <ActiveTexture>
|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> Image for enabled console. Examples:
 
_con_ALARM_SLEEP / _con_INFO / _con_MTC_2 / _con_mtc_stairs / _con_MTCOM_DISH / _con_MTCOM_DISH
|-
|valign="top"| <TriggeredTexture>
|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> Image for used console. Examples:
 
_con_ALARM_ON / _con_USED / _con_used / _con_MTC_DISHFLASH
|-
| <Events>
| -
| You can use multiple events. (int16 data field type)
|-
|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 "hi"
}''
|-
| <ActivateTurret TargetId="''Id''" />
| integer
|
|-
| <DeactivateTurret TargetId="''Id''" />
| integer
|
|-
| <ActivateConsole TargetId="''Id''" />
| integer
|
|-
| <DeactivateConsole TargetId="''Id''" />
| integer
|
|-
| <ActivateAlarm TargetId="''Id''" />
| integer
|
|-
| <DeactivateAlaram TargetId="''Id''" />
| integer
|
|-
| <ActivateTrigger TargetId="''Id''" />
| integer
|
|-
| <DeactivateTrigger TargetId="''Id''" />
| integer
|
|-
| <LockDoor TargetId="''Id''" />
| integer
|
|-
| <UnlockDoor TargetId="''Id''" />
| integer
|
|}


* <InactiveTexture> : _con_ALARM_SLEEP / _con_USED / _con_used / _con_INACTIVE / <font color="#777">(etc.)</font>
* <ActiveTexture> : _con_ALARM_SLEEP / _con_INFO / _con_MTC_2 / _con_mtc_stairs / _con_MTCOM_DISH / _con_MTCOM_DISH / <font color="#777">(etc.)</font>
* <TriggeredTexture> : _con_ALARM_ON / _con_USED / _con_used / _con_MTC_DISHFLASH / <font color="#777">(etc.)</font> (custom textures should be possible)
* <Events>
: <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''" />
: (You can use multiple events.)


{{XML}}
{{XML}}

Revision as of 17:08, 11 March 2013

CONS : Console spawn collection
XML modding tips
  • See HERE to start learning about XML modding.
  • See HERE if you are searching for information on how to handle object coordinates.
  • See HERE for some typical modding errors and their causes.
XML.png
XML

AKEV << Other file types >> CONS

TMBD << Other BINA >> ONIE

CHAR << Other OBJC >> CMBT

switch to OBD page

general information

  • The xml code on this page was tested with onisplit version 0.9.61.0 and 0.9.82.0
  • Y value of "chr_debug_characters = 1" doesn't need to be changed.
  • Facing (Y rotation) needs to be changed by 180 degrees.
  • This console spawning doesn't include console geometry (see screenshot) unless it's done via ONLV level import.
  • BINACJBOConsole.oni is level specific. (It can be found in edition/GameDataFolder/levelXX_... )
  • All consoles can be seen HERE.
  • Activation tolerances - player must fullfill following requirements before he can use the console:
    • a distance of 10 or less (world units)
    • a distance of -2 or less (e.g. you can't activate console while standing inside or behind it)
    • a facing of 1,22173 radians (ca. 70°) or less
    • a sideways distance of 8 or less
    • a height of 8 or less (pelvis height - console height)


file structure

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

[...] means at least one console. Paste all console data into there (this includes <CONS Id="..."> and </CONS> tag).


example

console_preview.png

       <CONS Id="8179">
           <Header>
               <Flags>Locked Gunk</Flags>
               <Position>-1354.927 45 860.053</Position>
               <Rotation>180.000015 0 180.000015</Rotation>
           </Header>
           <OSD>
               <Class>console0</Class>
               <ConsoleId>2</ConsoleId>
               <Flags>Active</Flags>
               <InactiveTexture>_con_INACTIVE</InactiveTexture>
               <ActiveTexture>_con_MTCOM_DISH</ActiveTexture>
               <TriggeredTexture>_con_MTC_DISHFLASH</TriggeredTexture>
               <Events>
                   <Script Function="fconsole_ok" />
               </Events>
           </OSD>
       </CONS>


tags

tag type description
<?xml version="1.0" encoding="utf-8"?> float, flag Don't change this.
<Oni> -
<Objects> -
<CONS Id="..."> integer Use any number. No need to be unique.
<Header> -
<Flags> flag Gunk flags. Appears useless.
<Position> float x3 X Y Z position. For original consoles use Y=0 if ground plane is 0.
<Rotation> float x3 X Y Z rotation. chr_debug_characters = 1 shows the player's facing which can be used for console's Y value. X and Z should be 0.
<OSD> -
<Class> link Original consoles:
console_alarm
console_data
console0
console_small_wu_roof

For level import via xml master file use absolute/relative file path, e.g. consoles/console_data.oni

<ConsoleId> integer Can be used with BSL commands like "console_deactivate ID".
<Flags> flag
None
<Flags></Flags> also works; console will appear disabled.
InitialActive
Console will appear enabled.
Punch
Was used for TRAMKONOKOconsole_punch.
IsAlarm
Alarm console. Used with alarm groups in CHAR.
<InactiveTexture> char[63] TXMPfile.oni (don't use file prefix/suffix) Image for disabled console. Examples:

_con_ALARM_SLEEP / _con_USED / _con_used / _con_INACTIVE

<ActiveTexture> char[63] TXMPfile.oni (don't use file prefix/suffix) Image for enabled console. Examples:

_con_ALARM_SLEEP / _con_INFO / _con_MTC_2 / _con_mtc_stairs / _con_MTCOM_DISH / _con_MTCOM_DISH

<TriggeredTexture> char[63] TXMPfile.oni (don't use file prefix/suffix) Image for used console. Examples:

_con_ALARM_ON / _con_USED / _con_used / _con_MTC_DISHFLASH

<Events> - You can use multiple events. (int16 data field type)
<Script Function="call_this_BSL_function" /> 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 "hi"
}
<ActivateTurret TargetId="Id" /> integer
<DeactivateTurret TargetId="Id" /> integer
<ActivateConsole TargetId="Id" /> integer
<DeactivateConsole TargetId="Id" /> integer
<ActivateAlarm TargetId="Id" /> integer
<DeactivateAlaram TargetId="Id" /> integer
<ActivateTrigger TargetId="Id" /> integer
<DeactivateTrigger TargetId="Id" /> integer
<LockDoor TargetId="Id" /> integer
<UnlockDoor TargetId="Id" /> integer