Oni Central Forum

A Community-driven Forum discussing Bungie's Oni

You are not logged in.

#1 17/9/09 21:19

EdT
Moderator

Modding Tutorials

This thread will be used to share tutorials on modding Oni, using Anniversary Edition and Onisplit.

Offline

#2 17/9/09 21:22

EdT
Moderator

Re: Modding Tutorials

Adding Spawnable Characters to a Level - XML instructions.

The BINACJBOCharacter.oni file contains the list of characters and their parameters that can be spawned on a specific level.
You can find the file at Oni\Edition\GameDataFolder\levelx_Final

To add more characters to a level, you will need to extract the BINACJBOCharacter.oni file as xml. 

For example, let's say you want to add Muro to level1. 

Use a GUI or the basic command: OniSplit.exe extract:xml extractdir path_to\level1_Final\BINACJBOCharacter.oni. 

Next extract the BINACJBOCharacter.oni file from the level that contains Muro, such as level19.

In the BINACJBOCharacter.xml file search for Muro and you will get this:

    <Object Id="8733" Type="CHAR">
            <Header>
                <Flags>0</Flags>
                <Position>-112.0837 1486 -2619.775</Position>
                <Rotation>0 171.3265 0</Rotation>
            </Header>
            <OSD>
                <Flags>NotInitiallyPresent Omniscient Boss</Flags>
                <Class>muro_generic</Class>
                <Name>Muro</Name>
                <Weapon />
                <Scripts>
                    <Spawn />
                    <Die>check_death2</Die>
                    <Combat />
                    <Alarm />
                    <Hurt />
                    <Defeated />
                    <OutOfAmmo />
                    <NoPath />
                </Scripts>
                <AdditionalHealth>0</AdditionalHealth>
                <Job>
                    <Type>None</Type>
                    <PatrolPathId>0</PatrolPathId>
                </Job>
                <Behaviors>
                    <CombatId>0</CombatId>
                    <MeleeId>30</MeleeId>
                    <NeutralId>0</NeutralId>
                </Behaviors>
                <Inventory>
                    <Ammo>
                        <Use>1</Use>
                        <Drop>0</Drop>
                    </Ammo>
                    <EnergyCell>
                        <Use>1</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>Low</Initial>
                    <Minimal>Low</Minimal>
                    <JobStarting>Low</JobStarting>
                    <Investigating>Low</Investigating>
                </Alert>
                <AlarmGroups>0</AlarmGroups>
                <Pursuit>
                    <Strong>4</Strong>
                    <Weak>1</Weak>
                    <StrongSeen>4</StrongSeen>
                    <WeakSeen>4</WeakSeen>
                    <Lost>0</Lost>
                </Pursuit>
            </OSD>
        </Object>

Copy this entire section to the level1's BINACJBOCharacter.xml file.

At this point you can either adjust the settings of Muro, or keep it as is. 

To convert the BINACJBOCharacter.xml file to Oni format use the command: OniSplit.exe -create convertdir path_to\BINACJBOCharacter.xml

Finally, you will need to install the modified BINACJBOCharacter.oni file using a package. 
This file will be placed in the package folder directory oni/level1_Final/level1_Final

For more detailed information on the BINACJBOCharacter file see:
http://wiki.oni2.net/OBD:BINA/OBJC/CHAR

Last edited by EdT (18/9/09 18:18)

Offline

#3 17/9/09 21:42

Iritscen
Moderator

Re: Modding Tutorials

Hmm, are we duplicating information from the wiki now?  smile


byproducts are fine, but where's the beef?

Offline

#4 18/9/09 6:23

Samer
Member

Re: Modding Tutorials

Yay big_smile this is really helpful Edt ... I read the wiki but this is more detailed ... ^_^

some questions though  :$

in the AE aren't the BINACJBOCharacter  files already modified since we can shapeshift to all characters even those that are not present in the level ... or is this something independent ?

to spawn the character we have to use commands or scripts like ai2_spawn muro  right ?
if I want to add motoko do i use her name ? motoko

and once they are spawned where do they appear :S ?

Last edited by Samer (18/9/09 6:42)


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Online

#5 18/9/09 8:10

love_Oni
Member

Re: Modding Tutorials

Samoko wrote:

in the AE aren't the BINACJBOCharacter  files already modified since we can shapeshift to all characters even those that are not present in the level ... or is this something independent ?

No. There is a difference between "character" and "class". You meant we can shapeshift to all characters right? In fact, we can shapeshift to all classes, because in the AE, all ONCC files are put together in the level0_Final folder. In sort, class means "form" smile. For example in level 14, you can change Muro's form to Konoko but he still fight the same style that he has always fought, not Evil Konoko's style.

So how can we add an AI2 to a level, such as add Evil Konoko AI2 to level 14? That's what we called "character". EdT's tutorial above is about adding a character like that.

to spawn the character we have to use commands or scripts like ai2_spawn muro  right ?

Of course smile

if I want to add motoko do i use her name ? motoko

No. You need to add (or create) a new character in level 1 by:

1. Decide the name of the character. Notice the line:

<Object Id="8733" Type="CHAR">
            <Header>
                <Flags>0</Flags>
                <Position>-112.0837 1486 -2619.775</Position>
                <Rotation>0 171.3265 0</Rotation>
            </Header>
            <OSD>
                <Flags>NotInitiallyPresent Omniscient Boss</Flags>
                <Class>muro_generic</Class>
            <Name>Muro</Name>

   You can change the name to whatever you want.

2. Decide the form that the character will take (luckily all classes/forms are now available in all levels smile). Notice the line:

<Object Id="8733" Type="CHAR">
            <Header>
                <Flags>0</Flags>
                <Position>-112.0837 1486 -2619.775</Position>
                <Rotation>0 171.3265 0</Rotation>
            </Header>
            <OSD>
                <Flags>NotInitiallyPresent Omniscient Boss</Flags>
            <Class>muro_generic</Class>
                <Name>Muro</Name>

  To know a form's name you can cycle all classes to get it.

3. Decide character's team. Notice this:

<Team>Syndicate</Team>

  There are Syndicate, TCTF, KonokoRogue, Neutral etc. (if I remember correctly)

  4. Decide character's fighting style (the most important)

<Behaviors>
                    <CombatId>0</CombatId>
                <MeleeId>30</MeleeId>
                    <NeutralId>0</NeutralId>
                </Behaviors>

  The number in the bold line decides the fighting style of a character. There are some numbers in the file attachment (I collected it along time ago heh big_smile)

and once they are spawned where do they appear :S ?

They will appear at the flag whose number is metioned in the line:

<Object Id="8733" Type="CHAR">
            <Header>
            <Flags>0</Flags>
                <Position>-112.0837 1486 -2619.775</Position>
                <Rotation>0 171.3265 0</Rotation>
            </Header>

Is that very clear for you? smile

Last edited by love_Oni (18/9/09 8:11)


The Boy Who Knew Too Much tongue

Offline

#6 18/9/09 10:06

Samer
Member

Re: Modding Tutorials

that is clear , thanks for taking the time to explain all this love_Oni ! smile

i'll be spawning characters all over the place now  lol


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Online

#7 18/9/09 10:55

demos_kratos
Member

Re: Modding Tutorials

It's better to customize coords IMO. print "where" in CMD and you'll get your coords. you can run around the level printing "where" to get the most acceptible location. IIRC "where" shows not only the coords but rotation too. So don't be as lazy as me and get a pen end piece of paper near you smile


Jente, du er deilig, du er lekker, ihvertfall nå når jeg drikker.
Baby, du har det som trengs, hva er sannsynligheten for at vi to hopper til sengs?
Kan du si meg det? Jeg er ikke så stø i sannsynlighetsregning.

Offline

#8 18/9/09 18:22

EdT
Moderator

Re: Modding Tutorials

Create Custom Flag Locations - XML Tutorial
The flags for each level is located in the file BINACJBOFlag.oni.

To add more flags to a level, first extract the file BINACJBOFlag.oni as xml.  For example, level 1, use a GUI or the basic command: OniSplit.exe extract:xml extractdir pathto\level1_Final\BINACJBOFlag.oni

The following are the parameters that makes up a single flag.

        <Object Id="2671" Type="FLAG">
            <Header>
                <Flags>0</Flags>
                <Position>-0.278 0 -641.519</Position>
                <Rotation>0 172 0</Rotation>
            </Header>
            <OSD>
                <Color>0 255 0</Color>
                <Prefix>19800</Prefix>
                <FlagId>0</FlagId>
                <Notes />
            </OSD>
        </Object>

There are 3 parameters that you can change:

<Position>-0.278 0 -641.519</Position>
<Rotation>0 172 0</Rotation>
<FlagId>0</FlagId>

Position is the x,y,z location of the flag.  Rotation is the direction in degrees the AI will be facing. FlagID is the number of the flag.

How do you find the x,y,z location for a custom flag? Enable Dev Mode and go where you want to have a new flag. Next press ~ to get into console mode and type 'where' without the quotes.  You will see something like this:

Character 'char 0' is at (-255, 250, -275), facing 164 degrees, not in a BNV.

(This location is on the roof of the warehouse)

So a new flag would look like this:

        <Object Id="2671" Type="FLAG">
            <Header>
                <Flags>0</Flags>
                <Position>-255, 250, -275</Position>
                <Rotation>0 164 0</Rotation>
            </Header>
            <OSD>
                <Color>0 255 0</Color>
                <Prefix>19800</Prefix>
                <FlagId>1000</FlagId>
                <Notes />
            </OSD>
        </Object>

(Note give the FlagID a number that is not used in the level)

To convert the BINACJBOFlag.xml file to Oni format use the command: OniSplit.exe -create convertdir path_to\BINACJBOFlag.xml

Finally, you will need to install the modified BINACJBOFlag.oni file using a package.
This file will be placed in the package folder directory oni/level1_Final/level1_Final

For more detailed information on the BINACJBOFlag file see:
http://wiki.oni2.net/OBD:BINA/OBJC/FLAG

Offline

#9 18/9/09 18:36

EdT
Moderator

Re: Modding Tutorials

Just a correction on love_Oni's statement:

<Object Id="8733" Type="CHAR">
            <Header>
            <Flags>0</Flags>
                <Position>-112.0837 1486 -2619.775</Position>
                <Rotation>0 171.3265 0</Rotation>
            </Header>

The  <Flags>0</Flags> here mentioned is not related to the FlagID where you can spawn a character. according to http://wiki.oni2.net/OBD:BINA/OBJC/CHAR that parameter is unknown.

However, the next 2 items reflects the location and rotation where Muro will be spawned, using the command: ai2_spawn Muro

<Position>-112.0837 1486 -2619.775</Position>
<Rotation>0 171.3265 0</Rotation>

Normally, to set a character at a specific flag you would use the command:
chr_teleport Muro 0011

Offline

#10 22/9/09 14:22

Samer
Member

Re: Modding Tutorials

ADDING, REPLACING MOVES TUTORIAL

1st - u need to convert the desired TRAC to xml using OniSplit GUI the TRAC's are in level0_animations folder in the Game data folder of the edition
2- let's say we want to add a new move to konoko  for example the fury's running back kick
this table will show u the names of the moves ...
http://wiki.oni2.net/Gameplay/Combat_moves

you can see the name of that move is TRAMREDCOMrun_thw_bk_k  & TRAMREDCOMrun_thw_bk_k_tgt (for throws u have to add 2 animations)
3- we open konoko's trac xml file in a text editor like notepad

u'll see lines like this
<TRACAnimation>
                <Weight>100</Weight>
                <Animation>.................</Animation>
</TRACAnimation>

the ...... are the names of the moves ... so w copy that and add it after any </TRACAnimation>
and put the name of the move we want

<TRACAnimation>
                <Weight>100</Weight>
                <Animation>TRAMREDCOMrun_thw_bk_k </Animation>
</TRACAnimation>
<TRACAnimation>
                <Weight>100</Weight>
                <Animation>TRAMREDCOMrun_thw_bk_k_tgt </Animation>
</TRACAnimation>

to replace an existing move replace it with another one

replacing konoko's run punch with that of the fury

<TRACAnimation>
                <Weight>100</Weight>
                <Animation>TRAMKONKOrun_punch </Animation>
</TRACAnimation>

becomes

<TRACAnimation>
                <Weight>100</Weight>
                <Animation>TRAMREDrun_punch </Animation>
</TRACAnimation>

4- we save the file and convert it back to .oni

5- we make a package simply put this file in a folder ... then use OniSplit gui  go to the AE Package tab ... specify the source folder where u put the modified trac and the destination folder which would be in the edition\install\packages
give the package a name (no spaces)  and 5 digit number (make sure it doesn't conflict with the number of other packages)

and click create package ...

now go the AEinstaller check this new package and install and u're done

Last edited by Samer (24/9/09 7:24)


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Online

#11 10/10/09 1:45

Samer
Member

Re: Modding Tutorials

Make this a sticky too ^_^ ! It will be really helpful for new modders like it has been for me smile


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Online

#12 10/10/09 2:36

Gumby
Member

Re: Modding Tutorials

We'll see. I'd rather port this information to the wiki, and then add links to a stickied topic on the forum.


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#13 5/6/10 18:04

s10k
Member

Re: Modding Tutorials

Forget the idea. I realized it wouldn't work how I would want to.

However can someone tell me how can I call the blood animation when a player falls from a high place (gets hurt)? Is it possible only with XML editing, or I need to play with binaries? =S

Thanks

Last edited by s10k (5/6/10 18:24)

Offline

#14 5/6/10 22:08

Mukade
Member

Re: Modding Tutorials

All you have to do is edit the XML of the damaging landing animation and change it to emit the blood particle... i don't know what that particle is, but I'm sure you can figure that out


"He looks mean enough to tear my arm off and beat me to death with it. In fact, he looks mean enough to tear his OWN arm off and beat me to death with it."

Offline

#15 6/6/10 5:59

s10k
Member

Re: Modding Tutorials

I think I found it (attached)[if isn't TRAC can someone tell me the type of the file necessary to found?), how do I now emit the particle? (the way of call it)

edit\

I think I found it:
TRAMKONCOMjump_land_hd.oni

Last edited by s10k (6/6/10 6:09)

Offline

#16 6/6/10 7:02

s10k
Member

Re: Modding Tutorials

I'm having trouble in calling blood particle:

Wheres my code:

TRAMKONCOMjump_land_hd.xml

<?xml version="1.0" encoding="utf-8"?>
<Oni Version="0.9.50.0">
    ...
        <Particles>
            <Particle>
                <Start>1</Start>
                <End>10</End>
                <Bone>LeftFoot</Bone>
                <Name>_BLOOD</Name>
            </Particle>
            <Particle>
                <Start>1</Start>
                <End>10</End>
                <Bone>RightFoot</Bone>
                <Name>_BLOOD</Name>
            </Particle>
            ...
        </Particles>
      ...
</Oni>

I have also tried: <Name>blood</Name>, <Name>_BLOOD</Name>, <Name>blood_emit</Name> even <Name>h2h_flash_e01</Name> (the flash particle that emits blood)

Offline

#17 6/6/10 11:11

Gumby
Member

Re: Modding Tutorials

You can't link to particles directly from TRAMs, remember? It has to go TRAM->ONCC (ONCP)=>PAR3.

Look inside Konoko's ONCC for the particle named in the TRAM and edit that. Should be h2h_thud_e01 or something.


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#18 6/6/10 13:28

s10k
Member

Re: Modding Tutorials

Ok, thanks going to look. (another day, since I have don't have time now)
Thanks.

Last edited by s10k (6/6/10 13:29)

Offline

#19 21/6/10 10:53

coool
Member

Re: Modding Tutorials

HMMM...where is the texture of konoko's face?
I can't find it

is it this one? ----> TXMPIteration002%2Fk4_head
but I export it as png,it's all white...I can see the hair only

Offline

#20 21/6/10 21:09

EdT
Moderator

Re: Modding Tutorials

coool: Welcome Back!  I missed your texture work.

Where did you get the texture from? level0_Final or from a package?

Offline

#21 21/6/10 21:26

coool
Member

Re: Modding Tutorials

long time no see~  smile

I get the texture from level0_Final,
this time it is OK,I export it as tga. but the texture is the original one,it's different from what I see in game

Offline

#22 21/6/10 22:33

Gumby
Member

Re: Modding Tutorials

Which texture do you want, SeverEDs? If you want that you either have to reextract level 0, or find it in the package folder...


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#23 22/6/10 2:17

ndg0809
Member

Re: Modding Tutorials

I have converted the BINA/OBJC/CHAR.oni file to xml .But how to I open it? when i double click it it opens in Internet Explorer  yikes

Last edited by ndg0809 (22/6/10 2:17)

Offline

#24 22/6/10 2:38

Tantir
Member

Re: Modding Tutorials

You can open it in Notepad. Simply, click on it with right mouse button, and then choose "edit" option.

Offline

#25 22/6/10 7:11

s10k
Member

Re: Modding Tutorials

I recommend notepad++, wonderful program.

Offline

Board footer