You are not logged in.
Pages: 1
We are very close to importing fully working levels back to Oni. Doors and consoles work, pathfinding grids are automatically generated, patrol paths work. For cutscenes to function, it will require a lot more manual work on our part to get all the pieces together. (OBANs, M3GMs, FILMs and so on) There does not seem to be a way to automate this process.
As you can see in the screenshot, I added more cars to the parking lot in TCTF headquarters. (Though some people can't park their cars right).
Update (Sep 8, 2011)
The files for your enjoyment: http://edt.oni2.net/OniSplit/Level_Tools.zip
Place the latest OniSplit and the tools folder in the Edition/install folder.
Inside the tools folder you will find classes which holds all the door and console types and OBAN files for the doors, OFGA and their related M3GM and TXMP files.
There is also a sample tctf folder with some of the files needed to import the level.
The control file is tctf.xml, this links all the files together. Some key parts:
<Environment>
<Model>
<Import>env/tctf_env.dae</Import>
</Model>
<Rooms>
<Import>env/tctf_bnv.dae</Import>
</Rooms>
</Environment>
This is where you enter the name of the env and bnv file of the level.
<Sky>sunset</Sky> What type of sky you want.
Note, the name of the control file must match the name of the AKEV from the level,
You will need to extract AKEVtctf from the level8_Final folder inside the GameDataFolder, put all the files (tctf_env.dae, tctf_bnv.dae, tctf_obj.dae, grids, images and markers folders) into the env folder.
The command to make the level files is:
onisplit -create:level tools/tctf/out tools/tctf/tctf.xml
This will create an out folder inside the tctf folder with all the .oni files.
Move all the files from the out folder into the level8_Final folder. Before you do this, make a copy of the level8_Final folder, so you will always have the original files, in case something goes wrong.
Finally, rebuild/compile level 8.
If you want to modify a different level, the process is the same. 1) Make a new folder inside the tools folder, for example "lab". 2) The structure of the new folder should be the same as tctf. 3) Extract from the level folder all the BINACJBO files as .xml and the AKEV file as .dae. 4) Make a control xml file, follow the structure of the tctf.xml file.
Modifying a level.
Adding objects.
This is done through the BINACJBOFurniture.xml file. If you open the file from the tctf folder, the first 4 entries are the cars I added to the parking lot. The structure is this:
<FURN>
<Header>
<Flags>Locked Gunk</Flags>
<Position>-265 -1.5 160</Position>
<Rotation>0 90 0</Rotation>
</Header>
<OSD>
<Class>V_tctf_cruiser</Class>
<Particle />
</OSD>
</FURN>
Position: x,y,z coordinate of the object. Rotation, the direction it will be facing and Class, the name of the object. In the classes folder all the objects that can be added to a level are called OFGA. so OFGAV_tctf_cruiser in this example.
Modifying the environment.
For example, open the AKEVtctf_env.dae file in your favorite 3D program such as Mod Tools, Blender, Sketchup, etc (Note: Sketchup sometimes will fail to import a level's environment, I don't know why). Make the changes you want, if you added more areas, the bnv needs to be modified, so you can have pathfinding grids in the new areas.
Note to Mac users, download this filehttp://edt.oni2.net/OniSplit/agdb.zip and put the AGDB file which corresponds to the level into the levelx_Final folder. For example put AGDBtctf.oni in level8_Final folder. This file is in the PC version and helps OniSplit when extracting a level.
Once you have modified the environment, export it as dae, put it in the env folder and use the command again -create:level. If all goes well, you will see your modified level in game!
This is just a basic workflow, I have not done any modifications to an environment.
Last edited by EdT (09/08/11 09:09)
Offline
(Though some people can't park their cars right).
LOL
Looks cool! Seems we will even be able to improve original levels.
Offline
Another important milestone reached!
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
+1 EdT. Nice job
"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
Great job! It's amazing that the community can do things with the game and engine the developers could only dream of...
"New car, caviar, four star daydream, think I'll buy me a football team."
Oni fan since 2001.
Offline
I think the developers could do many things they promised but they didnt cause the games release was rushed.
-I noticed that the hackers of oni community made a lot of modifications before they locked me up, do you have any idea what they want with an old game? -Modifications? What kind of modifications?
-Hard to tell, without getting a look at things but it looks like they're repurposing it. -Why?
-Beats me, all the game has is brutal melee combat and furious gunplay. -I dont like the sound of that.....
Offline
Yes, and much of what we're doing here is just recreating the abilities of the Bungie team. But they could have done a lot more with another six months or a year.
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
Making new OFGA files
The BINACJBOFurniture file is used to place objects through the level. The objects are know as OFGA.
<OFGA id="0">
<EnvParticle />
<Elements>
<OFGAElement>
<GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
<Geometry>M3GMV_tctf_cruiser_0</Geometry>
</OFGAElement>
<OFGAElement>
<GunkFlags>NoCharacterCollision NoOcclusion</GunkFlags>
<Geometry>M3GMV_tctf_cruiser_6</Geometry>
</OFGAElement>
<OFGAElement>
<GunkFlags>Invisible NoObjectCollision</GunkFlags>
<Geometry>M3GMV_tctf_cruiser_7</Geometry>
</OFGAElement>
</Elements>
</OFGA>
OFGAElement links to the M3GM and the flags for the object. The object can be made up of multiple parts. This tctf cruiser is composed of 8 parts. The last element is basically a box around the entire car.
The objects can be created in a 3D program and exported as an .obj and .mtl files. Then these 3d files are converted to M3GM files with the OniSplit command -create:m3gm
An example will be posted later.
Offline
Getting cutscenes to work
Reserved
Offline
Having fun.
Moveable furniture was one of the features mentioned in Oni, however, it was removed before its release. However, we can now implement it to a limited degree, due to Oni's physics engine. We can push things around, but cannot jump on them, you will fall through the object. Sometimes collisions work, other times they don't.
To make it happen, you will need a new file called physics.xml. It will need to look like this:
<?xml version="1.0" encoding="utf-8"?>
<Oni>
<Physics>
<Object Name="object_chair">
<ScriptId>1</ScriptId>
<Geometry>officechair</Geometry>
<Flags>FaceCollision</Flags>
<Physics>Physics4</Physics>
<Position>250 1 -330</Position>
<Rotation>0 0 0</Rotation>
</Object>
</Physics>
</Oni>
Object Name: needs to be unique, ScriptId: unique number, Geometry: OFGA name, Position x,y,z coordinates, Rotation: angle of facing.
In the control file add the link <Import>out/physics.xml</Import> inside the Objects tag and place the physics.xml file in the out folder.
Finally, in the bsl file you need to add the command: obj_create ScriptID, in this example it would be obj_create 1
Then you will have something like this: http://www.youtube.com/watch?v=YICB7qugrtc
Interestingly, if you use the command ob_show_debug=1 in the Dev Console, you will see something like this:
It shows the bounding box and collision sphere. For some unknown reason the collision sphere for the chair is very small.
Offline
First post updated with files and instruction on modding an existing level, have fun!
Offline
Whoa! Edt ur KING!!!
"Your mine!"
Offline
You're fast!
Offline
Added the instructions for moveable furniture to the tutorial.
Offline
I'm curious. Was it an unused feature left unfinished by the programmers or we just used the physics in a different way?
Offline
With this we will finally be able to play furniture soccer. What a great day.
Oni IRC | Kumite! Kumite! Kumite!
Offline
With this we will finally be able to play furniture soccer. What a great day.
New game mode for Flatline, how about that?
Circus Afro, Circus Afro, Polka Dot, Polka Dot!
Offline
I'm curious. Was it an unused feature left unfinished by the programmers or we just used the physics in a different way?
Because its buggy and not useful for anything.
Iritscen:
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours
Offline
Pages: 1