User:Paradox-01/for WIP pages

From OniGalore
< User:Paradox-01(Difference between revisions)
Jump to: navigation, search
m (no interruption if both (0x75 and 0x77) are 0)
(BINA/OBJC/CHAR: spawnable characters)
(2 intermediate revisions by one user not shown)
Line 154: Line 154:
 
'''tags (incomplete)'''
 
'''tags (incomplete)'''
 
* <Header>
 
* <Header>
:: <Flags> : unknown; usually 0
+
:: <Flags> : (unknown; usually 0)
:: <Position> : character is spawned at this position
+
:: <Position> : (character is spawned at this xyz-position
:: <Rotation> : character is spawned with this rotation
+
:: <Rotation> : (character is spawned with this rotation)
 
* <Flags> determines some special properties
 
* <Flags> determines some special properties
 
:: "IsPlayer" makes first character (in this file) into the character which is controlled by the player. (Usually not used with other flags.)
 
:: "IsPlayer" makes first character (in this file) into the character which is controlled by the player. (Usually not used with other flags.)
 
::: Multiple characters with "IsPlayer" makes it possible to change the player controlled character by using BSL commands, for example: "chr_delete(Muro);ai2_spawn(barabus)"
 
::: Multiple characters with "IsPlayer" makes it possible to change the player controlled character by using BSL commands, for example: "chr_delete(Muro);ai2_spawn(barabus)"
 
:::: Better don't use a delay here, it seems to kick off a camera glitch...
 
:::: Better don't use a delay here, it seems to kick off a camera glitch...
:: "NotInitiallyPresent" : ...
+
:: "NotInitiallyPresent" : (...)
:: "Omniscient" : ...
+
:: "Omniscient" : (...)
:: "RandomCostume" flag belongs to ONCV ...
+
:: "RandomCostume" : (flag belongs to ONCV)
:: "Boss" : ...
+
:: "Boss" : (...)
:: "HasLSI" : this character drops an level specific item (truck keys / etc.)
+
:: "HasLSI" : (this character drops an level specific item like truck keys in [[CHAPTER_14_._DAWN_OF_THE_CHRYSALIS|level 19]])
:: "NonCombatant" ...
+
:: "NonCombatant" : (...)
:: "CanSpawnMultiple" : ...
+
:: "CanSpawnMultiple" : (needs "WasSpawned")
:: "WasSpwaned" : ...
+
:: "WasSpwaned" : (...)
 
:: "InfiniteAmmo" : (Raiden: "You got enough ?" Snake points to his head. "Infinite ammo...")
 
:: "InfiniteAmmo" : (Raiden: "You got enough ?" Snake points to his head. "Infinite ammo...")
:: "UpgradeDifficulty" : spawns a stronger enemy if you play on medium or hard
+
:: "UpgradeDifficulty" : (spawns a stronger enemy if you play on medium or hard)
 
:: "Unkillable" : (character won't loss more life points if it reaches 1, same as BSL command "chr_unkillable")
 
:: "Unkillable" : (character won't loss more life points if it reaches 1, same as BSL command "chr_unkillable")
:: unknown : (well, it's not "chr_invincible"<!-- maybe daodan flag ? -->)
+
:: "Unknown" : (well, it's not "chr_invincible"<!-- maybe daodan flag ? -->)
:: NoAutoDrop : ...
+
:: "NoAutoDrop" : (...)
  
 
* <Class> : (means the ONCC name without file pre- and suffix. Interesting for BSL command "chr_set_class".)
 
* <Class> : (means the ONCC name without file pre- and suffix. Interesting for BSL command "chr_set_class".)
 
* <Name> : (is also used by (various) BSL commands)
 
* <Name> : (is also used by (various) BSL commands)
* <Weapon> : (character is spawned with a weapon. It's looked up by weapon name which should make also custom weapons available ('''untested'''))
+
* <Weapon> : (character is spawned with a weapon. It's looked up by weapon name which should make also custom weapons available)
 
* <Scripts> (main function independent BSL functions which are called from engine if presented)
 
* <Scripts> (main function independent BSL functions which are called from engine if presented)
:: <Spawn> : called when character is spawned
+
:: <Spawn> : (called when character is spawned)
:: <Die> : called when character dies (health reaches 0); can work multiple times  
+
:: <Die> : (called when character dies (health reaches 0); can work multiple times)
:: <Combat> : called when character notices an enemy; works only once  
+
:: <Combat> : (called when character notices an enemy; works only once)
:: <Alarm> : called when character is alarmed
+
:: <Alarm> : (called when character is alarmed)
:: <Hurt> : called when character is hurt for the first time; works only once  
+
:: <Hurt> : (called when character is hurt for the first time; works only once)
:: <Defeated> : called when character is "defeated" (health reaches 1); works only once  
+
:: <Defeated> : (called when character is "defeated" (health reaches 1); works only once)
:: <OutOfAmmo> : called when character runs out of ammo (reloads a weapon with the last clip/cell); works only once, and the character must have the ammo at spawn-time  
+
:: <OutOfAmmo> : (called when character runs out of ammo (reloads a weapon with the last clip/cell); works only once, and the character must have the ammo at spawn-time)
:: <font style="color:#777"><NoPath> : should be called when a character has trouble pathfinding, but isn't</font>
+
:: <font style="color:#777"><NoPath> : (should be called when a character has trouble pathfinding, but isn't</font>)
*  <AdditionalHealth> : ''main'' health is stored in called ONCC, "additional health" will be added to that ''main'' health
+
*  <AdditionalHealth> : (''main'' health is stored in called ONCC, "additional health" will be added to that ''main'' health)
 
* <Job>
 
* <Job>
:: <Type> : None / Idle / <font color="#777">Guard (never used in Oni)</font> / Patrol (*) / <font color="#777">Teambattle (never used in Oni)</font>
+
:: <Type>
 +
::: None
 +
::: Idle
 +
::: <font color="#777">Guard (never used in Oni)</font>
 +
::: Patrol
 +
:::: (Type Patrol in combination with PatrolPathID 0 makes character passive, better set Type to None if PatrolPathID is 0)
 +
::: <font color="#777">Teambattle (never used in Oni)</font>
 
:: <PatrolPathId> : (stored in [[OBD:BINA/OBJC/PATR|BINA/OBJC/PATR]]; 0 is taken when <Type> isn't "Patrol")
 
:: <PatrolPathId> : (stored in [[OBD:BINA/OBJC/PATR|BINA/OBJC/PATR]]; 0 is taken when <Type> isn't "Patrol")
 
* <Behaviors>
 
* <Behaviors>
Line 199: Line 205:
 
::: [[OBD:BINA/OBJC/NEUT|...]] (no overview so far)
 
::: [[OBD:BINA/OBJC/NEUT|...]] (no overview so far)
 
* <Inventory>
 
* <Inventory>
:: <Ammo>, <EnergyCell>, <Hypo>, <Shield>, <Invisibility>
+
:: <Ammo>, <EnergyCell>, <Hypo>, <Shield>, <Invisibility> : (amount in integer)
::: <Use>, <Drop> : characters can uses such items by given amount (AI doesn't seem to use hypos), AI characters drops such items when defeated
+
::: <Use>, <Drop> : (characters can uses such items by given amount (AI cannot use hypos), AI characters drops such items when defeated)
 
* <Team>
 
* <Team>
:: Konoko / TCTF / Syndicate / Neutral / SecurityGuard / RogueKonoko / Switzlerland (is melee-immune) / SyndicateAccessory
+
:: Konoko
* <InitialAmmo> : ammo in loaded weapon clip
+
:: TCTF
 +
:: Syndicate
 +
:: Neutral
 +
:: SecurityGuard
 +
:: RogueKonoko
 +
:: Switzlerland (is melee-immune)
 +
:: SyndicateAccessory
 +
* <InitialAmmo> : (percent value; ammo in loaded weapon clip)
 
* <Alert>
 
* <Alert>
 
:: <Initial> : (initial alert level) lull / low / medium / high / combat
 
:: <Initial> : (initial alert level) lull / low / medium / high / combat
Line 217: Line 230:
 
:: <Lost>
 
:: <Lost>
 
: [[CHAR#Less_basic_setup_-_Inventory.2C_team.2C_jobs.2C_alert.2Fpursuit|HERE]] are more information about "Alert" and "Pursuit".
 
: [[CHAR#Less_basic_setup_-_Inventory.2C_team.2C_jobs.2C_alert.2Fpursuit|HERE]] are more information about "Alert" and "Pursuit".
 
 
  
 
=[[OBD:BINA/OBJC/CONS|BINA/OBCJ/CONS]]: consols=
 
=[[OBD:BINA/OBJC/CONS|BINA/OBCJ/CONS]]: consols=
Line 454: Line 465:
 
* <Speed> : (float value; ''reference'': 0 means no movement, 1 is slow, and 2 is fast)
 
* <Speed> : (float value; ''reference'': 0 means no movement, 1 is slow, and 2 is fast)
 
* <EmitterCount> : (number of laser emitters in one trigger rail)
 
* <EmitterCount> : (number of laser emitters in one trigger rail)
* <Offset_0075> : (TimeOn: laser interruption interval in frames; no interruption if both (0x75 and 0x77) are 0)
+
* <Offset_0075> : (laser is on for a number of frames you set here)
* <Offset_0077> : (TimeOff: laser interruption in frames)
+
* <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.)
+
::(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>
 
* <Events>
:* ? (script funtion)
+
:* <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))
 
:* <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.)
  
 
=[[OBD:BINA/OBJC/TRGV|BINA/OBJC/TRGV]]: trigger volumes (TV)=
 
=[[OBD:BINA/OBJC/TRGV|BINA/OBJC/TRGV]]: trigger volumes (TV)=

Revision as of 13:29, 1 November 2008

Contents

XML modding: getting started

PC method 1: window address bar

Put the newest OniSplit.exe into the "edition\GameDataFolder" folder and use the window's address bar (that's where you can see the directory in full length).

Delete that address, type (for example) the code below, and hit enter.

   onisplit -extract:xml xml_dir level0_Final/ONCCkonoko*.oni

The star is good for mess extraction/creation and good for shorten long unique file names. ("ONCCkonoko_generic" will be extracted in new folder "edition\GameDataFolder\xml_dir".)


It's also a good idea to keep the code in a temporary opened text file. There you can easily modify the code for other files and doesn't need you to type it from beginning into the address bar. (Be aware of Windows' short cut "shift + c" for coping marked text and "shift + v" for pasting text.)


PC method 2: local CMD

If you want to call the CMD from any folder then you might try following.

REGEDIT4
[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="Open Command Window Here"
[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd.exe /k \"cd %L\""
[HKEY_CLASSES_ROOT\Drive\shell\cmd]
@="Open Command Window Here"
[HKEY_CLASSES_ROOT\Drive\shell\cmd\command]
@="cmd.exe /k \"cd %L\""

Copy the code into an empty text file and save it as whatever.reg, then double click it.

Now you can goto "Oni/edition" and mark the GameDataFolder, right-click it, a popup menu appears, click "Open Command Window Here".

...

PC method 3: using an GUI

Where was this UI again? What version does it support? (Was it Gumby's or Demos_cratos'?)


Mac method 1: using an GUI

AETools provides a GUI to the most common OniSplit commands. You can import and export from Oni by selecting the file and the options related to the file.

See: AE:Anniversary_Edition_Tools

Mac method 2: using the Terminal

Put the newest OniSplit.exe into the "Oni/GameDataFolder" folder.

Open the Terminal program then "change directory" to the GameDataFolder (Type "cd " then drag the GameDataFolder into the Terminal window, now press the RETURN key)

At this point you can enter the OniSplit commands, such as:

   mono onisplit.exe -extract:xml xml_dir level0_Final/ONCCkonoko*.oni

("ONCCkonoko_generic" will be extracted in new folder "GameDataFolder/xml_dir".)


BINA/OBJC: object collections

Some of these collections use coordinates for there objects.

Enter into the CMD "chr_debug_characters = 1" when you are in dev mode if you need to know new coordinates.

(Go with your character wherever you want, "chr_nocollision 0 1" let you go through walls.)


BINA/OBJC/CHAR: spawnable characters

(An alternative is AISA.)


XML structure

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

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

example

       <Object Id="10067" Type="CHAR">
           <Header>
               <Flags>0</Flags>
               <Position>347.216736 756 202.2008</Position>
               <Rotation>0 114.94648 0</Rotation>
           </Header>
           <OSD>
               <Flags>IsPlayer</Flags>
               <Class>barabus</Class>
               <Name>barabus</Name>
               <Weapon></Weapon>
               <Scripts>
                   <Spawn></Spawn>
                   <Die></Die>
                   <Combat></Combat>
                   <Alarm></Alarm>
                   <Hurt></Hurt>
                   <Defeated></Defeated>
                   <OutOfAmmo></OutOfAmmo>
                   <NoPath></NoPath>
               </Scripts>
               <AdditionalHealth>0</AdditionalHealth>
               <Job>
                   <Type>Idle</Type>
                   <PatrolPathId>0</PatrolPathId>
               </Job>
               <Behaviors>
                   <CombatId>9</CombatId>
                   <MeleeId>25</MeleeId>
                   <NeutralId>0</NeutralId>
               </Behaviors>
               <Inventory>
                   <Ammo>
                       <Use>0</Use>
                       <Drop>0</Drop>
                   </Ammo>
                   <EnergyCell>
                       <Use>0</Use>
                       <Drop>0</Drop>
                   </EnergyCell>
                   <Hypo>
                       <Use>0</Use>
                       <Drop>0</Drop>
                   </Hypo>
                   <Shield>
                       <Use>0</Use>
                       <Drop>0</Drop>
                   </Shield>
                   <Invisibility>
                       <Use>0</Use>
                       <Drop>0</Drop>
                   </Invisibility>
               </Inventory>
               <Team>Syndicate</Team>
               <InitialAmmo>100</InitialAmmo>
               <Alert>
                   <Initial>Combat</Initial>
                   <Minimal>Lull</Minimal>
                   <JobStarting>Low</JobStarting>
                   <Investigating>Medium</Investigating>
               </Alert>
               <AlarmGroups>0</AlarmGroups>
               <Pursuit>
                   <Strong>4</Strong>
                   <Weak>1</Weak>
                   <StrongSeen>4</StrongSeen>
                   <WeakSeen>4</WeakSeen>
                   <Lost>0</Lost>
               </Pursuit>
           </OSD>
       </Object>

You can add another character data block beneath an </Object> tag. (Well, add as much characters as you want.)


tags (incomplete)

  • <Header>
<Flags> : (unknown; usually 0)
<Position> : (character is spawned at this xyz-position
<Rotation> : (character is spawned with this rotation)
  • <Flags> determines some special properties
"IsPlayer" makes first character (in this file) into the character which is controlled by the player. (Usually not used with other flags.)
Multiple characters with "IsPlayer" makes it possible to change the player controlled character by using BSL commands, for example: "chr_delete(Muro);ai2_spawn(barabus)"
Better don't use a delay here, it seems to kick off a camera glitch...
"NotInitiallyPresent" : (...)
"Omniscient" : (...)
"RandomCostume" : (flag belongs to ONCV)
"Boss" : (...)
"HasLSI" : (this character drops an level specific item like truck keys in level 19)
"NonCombatant" : (...)
"CanSpawnMultiple" : (needs "WasSpawned")
"WasSpwaned" : (...)
"InfiniteAmmo" : (Raiden: "You got enough ?" Snake points to his head. "Infinite ammo...")
"UpgradeDifficulty" : (spawns a stronger enemy if you play on medium or hard)
"Unkillable" : (character won't loss more life points if it reaches 1, same as BSL command "chr_unkillable")
"Unknown" : (well, it's not "chr_invincible")
"NoAutoDrop" : (...)
  • <Class> : (means the ONCC name without file pre- and suffix. Interesting for BSL command "chr_set_class".)
  • <Name> : (is also used by (various) BSL commands)
  • <Weapon> : (character is spawned with a weapon. It's looked up by weapon name which should make also custom weapons available)
  • <Scripts> (main function independent BSL functions which are called from engine if presented)
<Spawn> : (called when character is spawned)
<Die> : (called when character dies (health reaches 0); can work multiple times)
<Combat> : (called when character notices an enemy; works only once)
<Alarm> : (called when character is alarmed)
<Hurt> : (called when character is hurt for the first time; works only once)
<Defeated> : (called when character is "defeated" (health reaches 1); works only once)
<OutOfAmmo> : (called when character runs out of ammo (reloads a weapon with the last clip/cell); works only once, and the character must have the ammo at spawn-time)
<NoPath> : (should be called when a character has trouble pathfinding, but isn't)
  • <AdditionalHealth> : (main health is stored in called ONCC, "additional health" will be added to that main health)
  • <Job>
<Type>
None
Idle
Guard (never used in Oni)
Patrol
(Type Patrol in combination with PatrolPathID 0 makes character passive, better set Type to None if PatrolPathID is 0)
Teambattle (never used in Oni)
<PatrolPathId> : (stored in BINA/OBJC/PATR; 0 is taken when <Type> isn't "Patrol")
  • <Behaviors>
<CombatId>
0 - Stand_and_Fire; 1 - Murder; 2 - Shoot_And_Fight; 3 - Take_my_Big_Black_Stuff; 4 - Assault; 5 - Civilian; 6 - Pursuit; 7 - Group_battle; 8 - Watchman; 9 - Barabbas_TCTF; 10 - COMGUY; 11 - SuperNinja; 12 - Griffin; 13 - Mutant_Muro; 14 - Alarm Guard; 15 - Non-Combatant; 16 - Griffin_Final; 207 - Sniper; 208 - Sniper For Joe;
New profile for AE: 17 - Average_striker
<MeleeId>
here are all melee IDs sorted by ID
<NeutralId>
... (no overview so far)
  • <Inventory>
<Ammo>, <EnergyCell>, <Hypo>, <Shield>, <Invisibility> : (amount in integer)
<Use>, <Drop> : (characters can uses such items by given amount (AI cannot use hypos), AI characters drops such items when defeated)
  • <Team>
Konoko
TCTF
Syndicate
Neutral
SecurityGuard
RogueKonoko
Switzlerland (is melee-immune)
SyndicateAccessory
  • <InitialAmmo> : (percent value; ammo in loaded weapon clip)
  • <Alert>
<Initial> : (initial alert level) lull / low / medium / high / combat
<Minimal> : (minimal alert level; flags same as above)
<JobStarting> : (alert level when starting a job; flags same as above)
<Investigating> : (alert level when investigating; flags same as above)
  • <AlarmGroups>
  • <Pursuit>
<Strong>
<Weak>
<StrongSeen>
<WeakSeen>
<Lost>
HERE are more information about "Alert" and "Pursuit".

BINA/OBCJ/CONS: consols

(Well, this is pretty much useless unless you can create the rest of the console.)


XML structure

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

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


example

console_preview.png

       <Object Id="8179" Type="CONS">
           <Header>
               <Flags>9</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>
               <DisabledTexture>_con_INACTIVE</DisabledTexture>
               <EnabledTexture>_con_MTCOM_DISH</EnabledTexture>
               <UsedTexture>_con_MTC_DISHFLASH</UsedTexture>
               <Events>
                   <Script Function="fconsole_ok" />
               </Events>
           </OSD>
       </Object>


tags (incomplete)

  • <Flags> : (unknown)
  • <Position> : (console is spawned at this xyz-position)
  • <Rotation> : (console is spawned with this xyz-rotation (in degrees))
  • <Class>: console0 / console_alarm / console_data / ?
  • <ConsoleId> : (used by BSL commands like "console_deactivate ID")
  • <Flags> : Active / ... / (0x20 - use punch animation (KONOKOconsole_punch.TRAM) .. WTF O_o )
  • <DisabledTexture> : _con_ALARM_SLEEP / _con_USED / _con_used / _con_INACTIVE / (etc.)
  • <EnabledTexture> : _con_ALARM_SLEEP / _con_INFO / _con_MTC_2 / _con_mtc_stairs / _con_MTCOM_DISH / _con_MTCOM_DISH / (etc.)
  • <UsedTexture> : _con_ALARM_ON / _con_USED / _con_used / _con_MTC_DISHFLASH / (etc.)
(how about custom textures .. ?)
  • <Events>
<Script Function="calling_this_BSL_function" />
...


BINA/OBCJ/FLAG: flags

Flags can be used for various BSL commands, e.g.

ai2_movetoflag
chr_facetoflag
chr_teleport
powerup_spawn
target_set
weapon_spawn


XML structure

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

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

example

       <Object Id="8171" Type="FLAG">
           <Header>
               <Flags>0</Flags>
               <Position>-590.5805 45 -136.398453</Position>
               <Rotation>0 178.032745 0</Rotation>
           </Header>
           <OSD>
               <Color>0 255 0</Color>
               <Prefix>19800</Prefix>
               <FlagId>77</FlagId>
               <Notes>compound tower</Notes>
           </OSD>
       </Object>
       <Object Id="8178" Type="FLAG">
           <Header>
               <Flags>0</Flags>
               <Position>-182.715027 -75 -2222.97729</Position>
               <Rotation>359.9998 0.6400126 359.999817</Rotation>
           </Header>
           <OSD>
               <Color>112 13 111</Color>
               <Prefix>17476</Prefix>
               <FlagId>100</FlagId>
               <Notes></Notes>
           </OSD>
       </Object>


tags

  • <Flags> : (unknown)
  • <Position> : (flag is set at this xyz-position)
  • <Rotation> : (flag has xyz-rotation (in degrees))
  • <Color> : (maybe used by "show_flags")
  • <Prefix> : (unknown; in compound level: 17476 always appears with color 112 12 111, and 19800 always with 0 255 0)
  • <FlagId> : (used by BSL commands and other files like BINA/OBJC/PATR: Patrol Path)
  • <Notes> : (space for notes: 128 characters)


BINA/OBCJ/PWRU: powerups

There are two ways to spawn powerups.

A) by using original or custom teleport flags which needs a BSL command, e.g.:
powerup_spawn invis 5
B) by using this powerup collection file


XML structure

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

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

example

powerup_preview.png

       <Object Id="8167" Type="PWRU">
           <Header>
               <Flags>0</Flags>
               <Position>-988.235 91.172 1513.963</Position>
               <Rotation>0 0 0</Rotation>
           </Header>
           <OSD>
               <Class>Shield</Class>
           </OSD>
       </Object>


tags

  • <Flags> : (unknown)
  • <Position> : (powerup is spawned at this position)
  • <Rotation> : (actually doesn't need any rotation)
  • <Class>
Ammo
EnergyCell
Hypo
Invisibility
Shield
LSI (level specific item)


BINA/OBJC/TRIG: (laser) trigger

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 (incomplete)

  • <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> :
  • <Flags> :
4 - active?
8 - initial active
10 - reverse
20 - pingpong
40 - unknown
80 - unknown
  • <LaserColor> : (RGB range is 0 to 255 x3; e.g. <Color>255 0 77</Color>)
  • <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.)

BINA/OBJC/TRGV: trigger volumes (TV)

XML structure

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

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

example

trigger_volume_preview.jpg

used BSL commands in screen shot:

  • debug_triggers = 1
  • chr_nocollision 0 1
  • chr_debug_characters = 1
  • chr_location 0 x y z
       <Object Id="8749" Type="TRGV">
           <Header>
               <Flags>1</Flags>
               <Position>-651.5666 -298 -633.4166</Position>
               <Rotation>0 0 0</Rotation>
           </Header>
           <OSD>
               <Name>trigger_volume_46</Name>
               <Scripts>
                   <Entry>train_block2</Entry>
                   <Inside></Inside>
                   <Exit>block_path</Exit>
               </Scripts>
               <Teams>255</Teams>
               <Size>46 31 46</Size>
               <TriggerVolumeId>46</TriggerVolumeId>
               <ParentId>0</ParentId>
               <Notes></Notes>
               <Flags>128</Flags>
           </OSD>
       </Object>
position   + size = volume
- 651.5666 + 46   = -605.5666 = x_blue_line_end
- 298      + 31   = -267      = y_blue_line_end
- 633.4166 + 46   = -587.4166 = z_blue_line_end

tags

  • <Flags> : (unknown)
  • <Position> : (a volume corner)
  • <Rotation> : (xyz-rataion in degrees)
  • <Name> : (can have up to 63 characters)
  • <Scripts> : (BSL functions; each can have up to 32 characters)
<Entry> : (called up when character enters the TV")
<Inside> : (called while character is inside the TV)
(This one is triggered at every frame (60 times per second) unless the trigger-only-once flag is set. Continuous triggering is typically needed for fire or gas damage.)
<Exit> : (called up when character leaves the TV)
  • <Teams>
1 - Konoko
2 - TCTF
4 - Syndicate
8 - Neutral
16 - SecurityGuard
32 - RogueKonoko
64 - Switzerland
128 - SyndicateAccessory
(every combination is possible)
255 - all teams (1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255)
  • <Size> : ("<Position>" and "<Size>" creates a volume by a space diagonal)
  • <TriggerVolumeId> : ...
  • <ParentId> : ...
  • <Notes> : (space for 128 characters)
  • <Flags>
1 - "entry" function called only once (otherwise called every time character enters the TV)
2 - "inside" function called only once (otherwise called at every frame while character is in the TV)
4 - "exit" function called only once (otherwise called every time character leaves the TV)
8 - "entry" function disabled (can be enabled with "trigvolume_enable tv_name entry 1")
16 - "inside" function disabled (can be enabled with "trigvolume_enable tv_name inside 1")
32 - "exit" function disabled (can be enabled with "trigvolume_enable tv_name exit 1")
64 - all 3 functions disabled (master switch, can be enabled with "trigvolume_enable tv_name all 1")
128 - only player characters can fire off the TV


Resetting the trigger volume

trigvolume_reset(string tv_name) resets the TV to its preset state. The primary use of this is to re-enable "entry", "inside" or "exit" calls once the TV has been triggered (only necessary if the respective trigger-only-once flags are set of course). Note that some or all the TV functions are disabled at level load, you'll have to enable them manually after resetting the TV.


BINA/OBJC/TURR: turrets

XML structure

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

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

example

turrets_preview.png

       <Object Id="8148" Type="TURR">
           <Header>
               <Flags>0</Flags>
               <Position>-670 45 -755</Position>
               <Rotation>0 0 0</Rotation>
           </Header>
           <OSD>
               <Class>psm_turret_floor</Class>
               <TurretId>1</TurretId>
               <Flags>0</Flags>
               <TargetedTeams>Konoko</TargetedTeams>
           </OSD>
       </Object>
       <Object Id="8149" Type="TURR">
           <Header>
               <Flags>0</Flags>
               <Position>-680.6955 45 -753.459656</Position>
               <Rotation>0 0 0</Rotation>
           </Header>
           <OSD>
               <Class>sbg_turret_floor</Class>
               <TurretId>1</TurretId>
               <Flags>2</Flags>
               <TargetedTeams>Konoko</TargetedTeams>
           </OSD>
       </Object>

tags

  • <Flags> : (unknown)
  • <Position> : (turret is spawned at this position; turret pod must be added in level architecture)
  • <Class>
mbo_turret_ciel / mbo_turret_floor / mbo_turret_wall (mbo stands for Mercury Bow)
phr_turret_... (... stands for ciel / floor / wall) (phr stands for Plasma Rifle)
psm_turret_... (psm stands for Phase Stream Projector)
sap_turret_... (sap stands for Hughes Black Adder (Uzi))
sbg_turret_... (sbg stands for Super Ball Gun )
scc_turret_... (scc stands for Scram Cannon )
vdg_turret_... (vdg stands for Van de Graaff Pistol)
(custom turrets can't be created yet)
  • <TurretId> : ...
  • <Flags> : (unknown)
  • <TargetedTeams>
Konoko
TCTF
Syndicate
Neutral
SecurityGuard
RogueKonoko
Switzlerland
SyndicateAccessory
(multiple flags are separeted by a space e.g. <TargetedTeams>Konoko TCTF RogueKonoko</TargetedTeams>)


BINA/OBJC/WEAP: weapons

There are two ways to spawn weapons.

A) by using original or custom teleport flags which needs a BSL command, e.g.:
weapon_spawn w3_phr 5
B) by using this weapon collection file


XML structure

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

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

example

weapon_preview.png

       <Object Id="8240" Type="WEAP">
           <Header>
               <Flags>0</Flags>
               <Position>-1519 45 1521</Position>
               <Rotation>180 0 0</Rotation>
           </Header>
           <OSD>
               <Class>w14_sbg2</Class>
           </OSD>
       </Object>


tags

  • <Flags> : (unknown)
  • <Position> : (weapon is spawned at this xyz-position)
  • <Rotation> : (weapon has xyz-rotation (in degrees); x seems to be of only use here)
  • <Class>
w1_tap
w2_sap
w3_phr
w4_psm
w5_sbg
w6_vdg
w7_scc
w8_mbo
w9_scr
w10_sni (for AE)
w11_ba1
w12_ba2 (for AE)
w13_muro (for AE)
w14_sbg2 (for AE)
(any other AE or custom weapon without file pre- and suffix; e.g. ONWCw24_psr.oni is just called by w24_psr)
(AE weapons are located in level0_Final folder)


BINA/PART: particle

Chenille

"Chenille" is a cheat that lunches Daodan glow for Konoko and (Mutant)Muro without the need of overpower (health above 100%), and turns on the bossshield.

The corresponding BSL command is "chr_super ai_name super_amount_in_float".

However, you can create your own daodanized characters by set following in ONCC:

       <HasDaodanPowers>1</HasDaodanPowers>

For visible effect you need to register your wanted particle. Search for:

   <Instance id="1" type="ONCP">
       [...]

Now you could insert Konoko's or Muro's particle:


Konoko

           <ONCPParticle>
               <Name>super_glow</Name>
               <Type>superglow_e01</Type>
               <BodyPart>0</BodyPart>
           </ONCPParticle>
           <ONCPParticle>
               <Name>super_l_hand</Name>
               <Type>super_e01</Type>
               <BodyPart>14</BodyPart>
           </ONCPParticle>
           <ONCPParticle>
               <Name>super_r_hand</Name>
               <Type>super_e01</Type>
               <BodyPart>18</BodyPart>
           </ONCPParticle>

Muro

           <ONCPParticle>
               <Name>super_glow</Name>
               <Type>murosuperglow_e01</Type>
               <BodyPart>0</BodyPart>
           </ONCPParticle>
           <ONCPParticle>
               <Name>super_l_hand</Name>
               <Type>murosuper_e01</Type>
               <BodyPart>14</BodyPart>
           </ONCPParticle>
           <ONCPParticle>
               <Name>super_r_hand</Name>
               <Type>murosuper_e01</Type>
               <BodyPart>18</BodyPart>
           </ONCPParticle>
  • super_glow means body glow
  • super_l_hand means left hand glow
  • super_r_hand means right hand glow
  • all super_.. are called from character being in overpower/entering chenille cheat/or using chr_super, however, their positions are actually determined by the <BodyPart> tag.
  • Insert your own particle (file name without pre- and suffix) into the <Type> tag for a custom Chenille.


lensflares

Chenille particle use traditionally lensflares (TXMP) but it's also possible to use animated images (TXAN). This allow us to create even more lively looking Chenilles (think of complicated flashes or flames). =D


example

fire_chenille_preview.png

At the right you can see an image that links to a small youtube vid.

(modified file: BINA3RAPasura_0T_superglow_p01.xml)
<TexGeom>bomb_fire2</TexGeom>


ONCV: character variant

Every character in BINACJBOCharacter can have a flag for shapeshifting* into a random** ONCC.

(This doesn't effect BINACJBOCharacter properties: the character will keep his/her name, melee profile, drop items, etc..)

* The XML flag is named "RandomCostume".
** The actual ONCC is chosen from all ONCC linking to the ONCV (It's like they create a pool for randomness.)


example

Motoko is her own character class, and doesn't change her appearance on difficulty level "hard".

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.27.0">
   <Instance id="0" type="ONCV" name="motoko">
       <ParentVariant>ONCVany</ParentVariant>
       <CharacterClass>motoko</CharacterClass>
       <CharacterClassHard></CharacterClassHard>
   </Instance>
</Oni>


ONGS: game settings

health bar

Note <UsedHealthElements> when you edit health indicator colors. Increase it by 1 if you add information in one more <HealthPercent> and <HealthColor>.

These changes effect also

  • BSL command "ai2_showhealth = 1"
  • Baba's regeneration (probably <UseSpecialTint> particle flag)
  • and melee impact flashes which show the character's health status who was hit

The color between health flags (<Float>) is a mix.

The color keeps the same when passing the the last health flag.


example

blue_health_bar_on_overpower_previe.png

       <UsedHealthElements>5</UsedHealthElements>
       <HealthPercent>
           <Float>0</Float>
           <Float>0.659999967</Float>
           <Float>0.979999959</Float>
           <Float>1</Float>
           <Float>1.5</Float>
           [...]
       <HealthColor>
           <Color>255 0 0</Color>
           <Color>255 255 0</Color>
           <Color>19 161 43</Color>
           <Color>0 255 0</Color>
           <Color>68 119 255</Color>
           [...]


ONVL: variant list

See ONCV for more information.

Caution: You can't produce a list which contains a placeholder. ONCV is checking all its links at game start, Oni will crash if a ONCV is missing.


when to use

Create new ONCVs and add them to ONVL if you don't want shapeshifting unique/boss characters. (And don't forget about the link in ONCC.)


example

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.27.0">
   <Instance id="0" type="ONVL" name="variant_list">
       <Variants>
           <Link>ONCVany</Link>
           <Link>ONCVcomguy</Link>
           [...]
           <Link>ONCVmotoko</Link>
       </Variants>
   </Instance>
</Oni>


PSpc: part specification

This file handles TXMP (images) in IGPG (in-game page) which is used by TxtC and maybe a few other.

You could also try to emulate image align that way. (The image would be a corner and the rest would be a transparent, stretched pixel line.)

Limitation: please note that an animated TXMP doesn't work in PSpc.


XML structure

1 4 7
2 5 8
3 6 9


There are 9 <TopLeft> and <RightBottom> tags, first of each belong together as well as all other seconds, thirds, up to ninths; but the order goes from top to bottom (so the upper parts are 1, 4, and 7).

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.28.0">
   <Instance id="0" type="PSpc" name="...">
       <TopLeft>
           <PSpcPoint>
               <Left>...</Left>
               <Top>...</Top>
           </PSpcPoint>
           [...]
       </TopLeft>
       <RightBottom>
           <PSpcPoint>
               <Right>...</Right>
               <Bottom>...</Bottom>
           </PSpcPoint>
           [...]
       </RightBottom>
       <Texture>TXMP...</Texture>
   </Instance>
</Oni>


positions on example

The image TXMPh_19 is the only one but Oni divide it into 9 parts, each part is framed by pixel coordinates, from [Left|Top] to [Right|Bottom].

The corners keep always away from center while boarders become stretched. Used parts in following example are 1, 4, and 7.

PSpc_original.png

TXMPh_19

PSpc_color_indicated.png

Green left part is 1.
Yellow middle pixel line is 4.
Orange right part is 7.
(The yellow line becomes stretched.)

Coordinates of 1: [0|0] to [64|32]
Coordinates of 4: [64|0] to [64|32]
Coordinates of 7: [65|0] to [128|32]


parts_ingame_preview.png

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.28.0">
   <Instance id="0" type="PSpc" name="level_19_part">
       <TopLeft>
           <PSpcPoint>
               <Left>0</Left>
               <Top>0</Top>
           </PSpcPoint>
           <PSpcPoint>
               <Left>0</Left>
               <Top>0</Top>
           </PSpcPoint>
           <PSpcPoint>
               <Left>0</Left>
               <Top>0</Top>
           </PSpcPoint>
           <PSpcPoint>
               <Left>64</Left>
               <Top>0</Top>
           </PSpcPoint>
           <PSpcPoint>
               <Left>0</Left>
               <Top>0</Top>
           </PSpcPoint>
           <PSpcPoint>
               <Left>0</Left>
               <Top>0</Top>
           </PSpcPoint>
           <PSpcPoint>
               <Left>65</Left>
               <Top>0</Top>
           </PSpcPoint>
           <PSpcPoint>
               <Left>0</Left>
               <Top>0</Top>
           </PSpcPoint>
           <PSpcPoint>
               <Left>0</Left>
               <Top>0</Top>
           </PSpcPoint>
       </TopLeft>
       <RightBottom>
           <PSpcPoint>
               <Right>64</Right>
               <Bottom>32</Bottom>
           </PSpcPoint>
           <PSpcPoint>
               <Right>0</Right>
               <Bottom>0</Bottom>
           </PSpcPoint>
           <PSpcPoint>
               <Right>0</Right>
               <Bottom>0</Bottom>
           </PSpcPoint>
           <PSpcPoint>
               <Right>64</Right>
               <Bottom>32</Bottom>
           </PSpcPoint>
           <PSpcPoint>
               <Right>0</Right>
               <Bottom>0</Bottom>
           </PSpcPoint>
           <PSpcPoint>
               <Right>0</Right>
               <Bottom>0</Bottom>
           </PSpcPoint>
           <PSpcPoint>
               <Right>128</Right>
               <Bottom>32</Bottom>
           </PSpcPoint>
           <PSpcPoint>
               <Right>0</Right>
               <Bottom>0</Bottom>
           </PSpcPoint>
           <PSpcPoint>
               <Right>0</Right>
               <Bottom>0</Bottom>
           </PSpcPoint>
       </RightBottom>
       <Texture>TXMPh_19</Texture>
   </Instance>
</Oni>

TRAC: animation collection

The TRAC file makes animations available for characters by a link in ONCC. However, the AI's animation usage is determined in the melee profile.

The TRAC can have a parent TRAC. E.g. one contains basic movements, the other contains melee animations. This ensures a good organization of collections. You know, a civil character doesn't need melee animations but can use strikers core animations for movement.

Child's (e.g. Elite) melee animations are usually taken rather than its parent's melee (e.g. Striker) animations.

Something obscure... Do you know why Shinatama can only perform very few attack moves? Because in her own TRAC file are no attack moves, and her TRAC's parent collection (KonokoCore's TRAC) has only Twister Kicks, Willow Kick moves.

The <Weight> tag contains usually "100". A higher value indicates that this animation has a better chance to be picked up if there are multiple animations possible for the same (from state, animation type, varient, first level) pair.


XML structure

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.27.0">
   <Instance id="0" type="TRAC" name="...">
       <ParentCollection>TRAC...</ParentCollection>
       <Animations>
           <TRACAnimation>
               <Weight>...</Weight>
               <Animation>TRAM...</Animation>
           </TRACAnimation>
           [...]
       </Animations>
   </Instance>
</Oni>


example

Add the bold code into Shinatamas TRAC if you want her (as player character) to perform the Devil Spinning Kick.

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.27.0">
   <Instance id="0" type="TRAC" name="shinatama_animations">
       <ParentCollection>TRACkonokocore_animations</ParentCollection>
       <Animations>
           <TRACAnimation>
               <Weight>100</Weight>
               <Animation>TRAMSHINATsit</Animation>
           </TRACAnimation>
           <TRACAnimation>
               <Weight>100</Weight>
               <Animation>TRAMSHINATunsit</Animation>
           </TRACAnimation>
           <TRACAnimation>
               <Weight>100</Weight>
               <Animation>TRAMSHINATsit_idle</Animation>
           </TRACAnimation>
           <TRACAnimation>
               <Weight>100</Weight>
               <Animation>TRAMSHINATstand_heli</Animation>
           </TRACAnimation>
           <TRACAnimation>
               <Weight>100</Weight>
               <Animation>TRAMKONCOMkick_heavy</Animation>
           </TRACAnimation>
       </Animations>
   </Instance>
</Oni>


TRAC hierarchy

In vanilla Oni exist 22 TRAC files in the "level0_Final" folder but only two of them are grandparent TRACs (konokocore_animations and strikercore_animations). The other 20 TRAC files are either parents or children.

No.

TRAC file

Used by

Linked to a No. (X)

(1)

TRACkonokocore_animations.oni

All female characters

(2), (3), (4), (5)

(2)

TRACkonokolev1_animations.oni

Konoko in level 1

(6), (7)

(3)

TRACshinatama_animations.oni

Shinatama

-

(4)

TRACShinzom_animations.oni

Zombie Shinatama

-

(5)

TRACred_animations.oni

Fury (Red - Female Striker)

-

(6)

TRACkonoko_animations.oni

Later-level Konoko characters

-

(7)

TRACgen_f_animations.oni

Female civilians

-

(8)

TRACstrikercore_animations.oni

All male characters

(9), (10), (11), (12)

(9)

TRACstriker_animations.oni

Striker

(13)

(10)

TRACcomguy_animations.oni

Comguy, Mad Bomber, TCTF lite, Black Ops

(15), (16), (17), (18), (19), (20), (21)

(11)

TRACTCTFswat_animations.oni

TCTF SWAT, Black Ops

-

(12)

TRACninja_animations.oni

Ninja

-

(13)

TRACelite_animations.oni

Elite (Elite Striker)

(14)

(14)

TRACbarabus_animations.oni

Barabas (Barabus)

-

(15)

TRACdoctor_animations.oni

Doctor Kerr

-

(16)

TRACgen_m_animations.oni

Male civilians

-

(17)

TRACgriffin_animations.oni

Griffin

-

(18)

TRACthug_animations.oni

Thug

-

(19)

TRACsecurity_animations.oni

Security Guards

-

(20)

TRACTanker_animations.oni

Tanker

-

(21)

TRACmuro_animations.oni

Muro

(22)

(22)

TRACmutantmuro_animations.oni

Mutant Muro

-

Remember, if you are going to add an animation (TRAM) into one parent TRAC then all ONCCs with a child TRAC which is linked to that modified parent TRAC will have also that animation. For example:

If you add "TRAMSTRCOMpunch_heavy" (Striker's special move) to (1) then all ONCCs with link to (2), (3), (4), (5) will also have that punch.

TRAM: animation

general information

You can find explanations about TRAM details HERE.


Every original/changed/new TRAM can be called via BSL command(s).

adding impact flash

We have to take care about three or more files types at once when we want to change*/add** an impact flash.

* ONCC, ONIE, TRAM.
** BINA3RAP, Impt, ONCC, ONIE, TRAM

Let's do the second case together now.


TRAM changes

Our example TRAM is DAYCOMlt_fw_kick in XML format. (This file belongs to Project Imago, so take KONCOMlt_fw_kick if you can't find it.) We are searching for the tag <ImpactParticle>.

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.28.0">
   <Animation>
       <Flags>BlockHigh Attack Atomic DontAim</Flags>
       <DirectAnimations>
           <Link></Link>
           <Link></Link>
       </DirectAnimations>
       <OverlayUsedBones></OverlayUsedBones>
       <OverlayReplacedBones></OverlayReplacedBones>
       <FinalRotation>0</FinalRotation>
       <MoveDirection>Forward</MoveDirection>
       <AttackSoundIndex>-1</AttackSoundIndex>
       <ImpactParticle></ImpactParticle>
       [...]

Here we add dayflash1 between the start <...> and end tag </...> (or any other name that isn't longer than 16 characters). Well, that's pretty much it for the TRAM. ^_^

       <ImpactParticle>dayflash1</ImpactParticle>


ONCC changes

Every "character class" file (ONCC) in XML format contains an "impact array" (ONIA). (Example file: ONCCdaya_asura.)

   <Instance id="2" type="ONIA">
       <Impacts>
           <ONIAImpact>
               <Name>redflash1</Name>
               <Type>Red_Super_Punch</Type>
               <Modifier>Heavy</Modifier>
           </ONIAImpact>
           [...]

Here we add our new impact as well.

           <ONIAImpact>
               <Name>dayflash1</Name>
               <Type>Day_Super_Kick</Type>
               <Modifier>Heavy</Modifier>
           </ONIAImpact>

Day_Super_Kick links to ONIE.


ONIE changes

Let's search for an existing section (Nin_Super_Kick). We copy that section and modifying only the tag <Impact Name="... and <Name>.

       <Impact Name="Day_Super_Kick">
           <Material Name="Character">
               <ImpactEffect>
                   <Component>Impact</Component>
                   <Modifier>Any</Modifier>
                   <Sound />
                   <Particles>
                       <Particle>
                           <Name>h2h_dayflash1_R_e01</Name>
                           <Orientation>0</Orientation>
                           <Location>0</Location>
                       </Particle>
                   </Particles>
               </ImpactEffect>
           </Material>
       </Impact>

h2h_dayflash1_R_e01 is the actual particle of the impact, file prefix (BINA3RAP (here)) and suffix (.oni) are usually not used for lookups.


BINA3RAP creating

See corresponding tutorial


Impt creating

Oni must know how to handle the impact. So let's create a last file. Here it is "ImptDay_Super_Kick.xml".

All heavy kicks link to (Impt)"Kick_Hit"(.oni), and all heavy punches link to (Impt)"Punch_Hit"(.oni).
<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.28.0">
   <Instance id="0" type="Impt" name="Day_Super_Kick">
       <ParentImpact>ImptKick_Hit</ParentImpact>
   </Instance>
</Oni>

adding colorful trails

Open the xml formated TRAM and search for the "Particles" tag and insert your code.

First example: TRAMSTRCOMcomb_p_p.xml

colorful_contrail_added_preview.png
       <Particles>
           <Particle>
               <StartFrame>0</StartFrame>
               <EndFrame>12</EndFrame>
               <Bone>LeftFist</Bone>
               <Name>contrail</Name>
           </Particle>
       </Particles>

"contrail" is looked up by the used character class (ONCC) which lunch the actual particle, here it is "h2h_strtrail_e01".


Second example is about two different contrails in one TRAM at same time. The animation is "TRAMSTRCOMpunch_heavy.xml".

different_contrails_in_attack_previ.png
       <Particles>
           <Particle>
               <StartFrame>0</StartFrame>
               <EndFrame>54</EndFrame>
               <Bone>RightWrist</Bone>
               <Name>contrail</Name>
           </Particle>
           <Particle>
               <StartFrame>0</StartFrame>
               <EndFrame>54</EndFrame>
               <Bone>LeftWrist</Bone>
               <Name>contrail_2</Name>
           </Particle>
       </Particles>

Note that you need to register the second contrail in the used ONCC as well.

           <ONCPParticle>
               <Name>contrail</Name>
               <Type>h2h_strtrail_e01</Type>
               <BodyPart>-1</BodyPart>
           </ONCPParticle>
           <ONCPParticle>
               <Name>contrail_2</Name>
               <Type>h2h_murtrail_e01</Type>
               <BodyPart>-1</BodyPart>
           </ONCPParticle>


TXAN: animated texture

This file will be automatically baked into an animated TXMP (.oni) file.

See TXMP tutorial if you want to create an animated texture.


TXMP: texture map

Non-animated TXMP

XML structure

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.28.0">
   <Texture>
       <Flags>...</Flags>
       <Format>...</Format>
       <EnvMap>TXMP...</EnvMap>
       <Image>TXMP....tga/png/...</Image>
   </Texture>
</Oni>


  • options for <Flags> (more than one are separated by a double space) : None HasMipMaps DisableUWrap DisableVWrap AnimUseLocalTime AnimBackToBack AnimRandom AnimIgnoreGlobalTime ShieldEffect InvisibilityEffect DaodanEffect
  • options for <Format> : ARGB4444 / RGB555 / ARGB5551 / RGB888 / DXT1
ARGB4444 or ARGB5551 is used if an alpha channel is presented. These two formats are used for reflectivity.
  • options for <EnvMap> : (that's where your "reflective" texture comes in; you see, reflectivity is actually a fake, you just see that texture inside)

Animated TXMP

An animated TXMP is possible in particle (BINA3RAP), body texture collection (TRMA), and probably in object textures.

(Use of reflectivity in praxis isn't confirmed yet).


XML structure

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.28.0">
   <Texture>
       <Flags>...</Flags>
       <Format>...</Format>
       <Speed>...</Speed>
       <Image>TXMP....tga/png/...</Image>
       [...]
   </Texture>
</Oni>
  • options for <Flags> (more than one are separated by a double space) : None HasMipMaps DisableUWrap DisableVWrap AnimUseLocalTime AnimBackToBack AnimRandom AnimIgnoreGlobalTime ShieldEffect InvisibilityEffect DaodanEffect
  • options for <Format> : ARGB4444 / RGB555 / ARGB5551 / RGB888 / DXT1
  • options for <Speed> : (an natural number (delay in frames, probably))


example

A simple one...

TXAN_in_TRMA.png
<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.28.0">
   <Texture>
       <Flags>HasMipMaps  DisableUWrap  DisableVWrap  AnimUseLocalTime</Flags>
       <Format>RGB555</Format>
       <Speed>4</Speed>
       <Image>TXMPasura_0T_chest_000.tga</Image>
       <Image>TXMPasura_0T_chest_001.tga</Image>
       <Image>TXMPasura_0T_chest_002.tga</Image>
       <Image>TXMPasura_0T_chest_003.tga</Image>
       <Image>TXMPasura_0T_chest_004.tga</Image>
       <Image>TXMPasura_0T_chest_005.tga</Image>
       <Image>TXMPasura_0T_chest_006.tga</Image>
       <Image>TXMPasura_0T_chest_007.tga</Image>
       <Image>TXMPasura_0T_chest_008.tga</Image>
       <Image>TXMPasura_0T_chest_009.tga</Image>
       <Image>TXMPasura_0T_chest_010.tga</Image>
       <Image>TXMPasura_0T_chest_011.tga</Image>
       <Image>TXMPasura_0T_chest_012.tga</Image>
       <Image>TXMPasura_0T_chest_013.tga</Image>
       <Image>TXMPasura_0T_chest_014.tga</Image>
   </Texture>
</Oni>


TxtC: text console (pages)

Console text pages can be called via BSL command "text_console". But note that they are level specific (not global available unless you make them global which means to swap them into level0_Final).


example function

func show_me_a_page
{
	chr_wait_animation 0 KONCOMcomb_p
	text_console level_1f
}


XML structure

Think of "instances" (#N) as file sections, they go from 1 to N. 0 is the header (it defines the file type, here "TxtC").

Every TxtC contains one instance of type IGPA.
Every IGPA contains a number of instances of type IGPG.
Every IGPG contains a number of instances of type IGSA.
Every IGSA contains a number of instances of type IGSt.
IGPA means a page array (think of it as a little book)
IGPG means a page
IGSA means a (text) string array
IGSt means a (text) string
Take care of the structure and the cake is yours.
TxtC_TN.png

example on "TxtClevel_1f.xml":

#0 (TxtC instance) links to #1 (IGPA instance)
#1 (IGPA instance) links from #2 up to #4 (IGPG instances, here we have 3 pages as you see)
#2 (IGPG instance) links to #32 (IGSA instances)
#3 (IGPG instance) links to #20 (IGSA instances)
#4 (IGPG instance) links to #6 (IGSA instances)
#5 corresponds to the TSFFTahoma placeholder
#6 (IGSA instance) links from #7 up to #19 (IGSt Instances)
#20 (IGSA instance) links from #21 up to #31 (IGSt Instances)
#32 (IGSA instance) links from #33 up to #43 (IGSt Instances)


text formatting

  • options for <Family> : TSFFTahoma
  • options for <Style> : Normal / Bold / Italic
  • options for <Color> : (RGB range is 0 to 255 x3; e.g. <Color>255 0 77</Color>)
  • options for <Size> : (10 and 12 are usually used)
  • options for <Flags> : Family Style Color Size
every IGSt (string) can use own properties. The <Flag> tag let you enable these. Add "Size" when you want to get a new font size, add "Color" when you want to get a new font color, etc..


example

In this example you can see a modified header, a link to instance number 5 was added (OniSplit reindexes it when repacking, so there is no conflict with the original instance #5, the TSFFTahoma placeholder).

modders_preview.png
<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.28.0">
   <Instance id="0" type="TxtC" name="level_31b">
       <Pages>#1</Pages>
   </Instance>
   <Instance id="1" type="IGPA">
       <Pages>
           <Link>#2</Link>
           <Link>#3</Link>
           <Link>#4</Link>
           <Link>#5</Link>
       </Pages>
   </Instance>

You can display a little image if you use the image tag in the IGPG instance. (Either non-animated TXMP or PSpc.)

<Text2> cannot be used for TxtC because there isn't a note/hint field.

   <Instance id="5" type="IGPG">
       <Font>
           <Family>TSFFTahoma</Family>
           <Style>Bold</Style>
           <Color>116 208 255</Color>
           <Size>10</Size>
           <Flags>Family Style Color Size</Flags>
       </Font>
       <Image>TXMPlevel31_modders</Image>
       <Text1>#44</Text1>
       <Text2></Text2>
   </Instance>

Instance number 46 has a space between the text tags (<Text> </Text>) to produce a new paragraph. The import doesn't care about that in onisplit v0.9.28 but you can fix that by writing "<Text xml:space="preserve"> </Text>".

   <Instance id="44" type="IGSA">
       <Strings>
           <Link>#45</Link>
           <Link>#46</Link>
           <Link>#47</Link>
       </Strings>
   </Instance>
   <Instance id="45" type="IGSt">
       <Font>
           <Family></Family>
           <Style>Bold</Style>
           <Color>116 208 255</Color>
           <Size>12</Size>
           <Flags>Style Color Size</Flags>
       </Font>
       <Text>That's a blue caption.</Text>
   </Instance>
   <Instance id="46" type="IGSt">
       <Font>
           <Family></Family>
           <Style>Normal</Style>
           <Color>0 0 0 0</Color>
           <Size>0</Size>
           <Flags></Flags>
       </Font>
       <Text xml:space="preserve"> </Text>
   </Instance>
   <Instance id="47" type="IGSt">
       <Font>
           <Family></Family>
           <Style>Normal</Style>
           <Color>150 150 150</Color>
           <Size>8</Size>
           <Flags>Color Size</Flags>
       </Font>
       <Text>And that's a white, smaller text.</Text>
   </Instance>
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox