User talk:Neo

From OniGalore
Revision as of 07:11, 26 June 2009 by Gumby (talk | contribs)
Jump to navigation Jump to search

New OniSplit version: OniSplit v0.9.37

What's new:

  • support for transparency in the environment importer


New OniSplit version: OniSplit v0.9.35

What's new:

  • conversion of recorded films (.dat binary files) to xml files that can be used to create FILM .oni files
   OniSplit film2xml out_dir film.dat


New OniSplit version: OniSplit v0.9.34

What's new:

  • SNDD importer
-WAV files (.wav, mono/stereo, 22.05KHz/44.1KHz, uncompressed(PCM)/compressed(MS-ADPCM)) produce SNDD files that are compatible with Oni PC retail.
-AIFC files (.aif/.aifc/.afc, mono/stereo 22.05KHz, compressed(ima4)) produce SNDD files that are compatible with Oni Mac.
Example
 OniSplit -create out_dir test.aif
 OniSplit -create out_dir test.wav


  • LOD support for creating TRBS files. This can be done by creating an xml file containing the following:
 <?xml version="1.0" encoding="utf-8"?>
 <Oni Version="0.9.29.0">
     <Instance id="0" type="TRBS">
         <Elements>
             <Link>barabus_body_1.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_3.dae</Link>
             <Link>barabus_body_4.dae</Link>
             <Link>barabus_body_5.dae</Link>
         </Elements>
     </Instance>
 </Oni>
and running the command (assuming the created xml file's name is barabus_body.xml):
 OniSplit -create out_dir barabus_body.xml
It's not strictly necessary to create 5 different geometries for each LOD. The following works just as well:
 <?xml version="1.0" encoding="utf-8"?>
 <Oni Version="0.9.29.0">
     <Instance id="0" type="TRBS">
         <Elements>
             <Link>barabus_body_1.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_3.dae</Link>
         </Elements>
     </Instance>
 </Oni>


  • An xml file can contain "links" to other xml/obj/dae files. For example you can have the following line in an ONWC xml file:
 <Geometry>pistol.obj</Geometry>
Assuming the file pistol.obj exists in the same directory an M3GM .oni file will be automatically created from it.
Relative paths work just as well:
 <Geometry>geometry/pistol.obj</Geometry>


  • The -create:subt, -create:txmp and -create:m3gm are sort of obsolete. They still work but now you can simply use '-create' (or just 'create'):
 OniSplit -create out_dir crate.dae
 OniSplit create out_dir -format:bgr555 -genmipmaps pic.tga
 OniSplit create out_dir subtitles.txt


  • Work in progress: the AKEV importer now reads Collada materials so the resulting AKEV is textured.
Sample levels:
TestLevel1 -- This level should look like this in-game: Image 1 Image 2 Image 3
TestLevel2 -- This level should look like this in-game: Image 1
A zip file contains the minimum needed to get a new level running in Oni. To "compile" a level extract it to a folder and run the following commands:
 OniSplit -create out -genmipmaps -format:dxt1 *.xml
 OniSplit -import:nosep . Oni\GameDataFolder\level1_Final.dat
(Of course, you need to change the output .dat file path to match your Oni installation path)
Note1: The hexagon level needs to be scaled up to work properly. Use the envscale option for this:
 OniSplit -create out -genmipmaps -format:dxt1 -envscale:40 *.xml
Note2: I've updated the level files to contain 20 empty corpses to prevent crashes.

Neo


I tried to extract the .dae from AKEVhexagon2.oni and got the following error message from OniSplit:

mono onisplit.exe -extract:dae hex3d level7_Final/AKEVhexagon2.oni

 /level7_Final/AKEVhexagon2.oni
 /level7_Final/AGDBhexagon2.oni
 System.NullReferenceException: Object reference not set to an instance of an object
 at Oni.Imaging.Texture.Read (Oni.InstanceDescriptor txmp) [0x00000] 
 at Oni.Geometry.GeometryDaeExporter.WriteImageLibrary (Oni.InstanceDescriptor[] textures) [0x00000] 
 at Oni.Geometry.GeometryDaeExporter.WriteEnvironment (Oni.InstanceDescriptor descriptor, System.String filePath) [0x00000] 
 at Oni.Geometry.GeometryDaeExporter.ExportInstance (Oni.InstanceDescriptor descriptor) [0x00000] 
 at Oni.Exporter.ExportInstanceList (System.Collections.Generic.List`1 descriptors) [0x00000] 
 at Oni.Exporter.Export (Oni.FileManager fileManager, System.String sourceFilePath, System.String filter) [0x00000] 
 at Oni.Program.ExtractGeometry (System.String[] args) [0x00000] 
 at Oni.Program.Main (System.String[] args) [0x00000]

EdT 03:42, 12 November 2008 (CET)

This happens when you don't have all the textures that are used by AKEV in the same folder. In this case the missing texture is TXMP<none> aka TXMP%3Cnone%3E.oni. You can copy it to that folder but there is another problem caused by it's funky name.

If you really want to do that you need to "create" hexagon using a different default texture:

 onisplit create out *.xml -format:dxt1 -envscale:40 -texdefault:notfoundtex

Now you can copy TXMPnotfoundtex.oni to the folder that contains the AKEV file and export should work.

PS: maybe I should make notfoundtex the default texture. That way I avoid using that troublesome <none> and it's more obvious which quads have missing textures.

Neo


DELETED, don't bother with that interpolation stuff (I apologize if you did). I found this bug useful in the end. It can be used for making more final resting poses than standard two, bringing more varienty into a game. But request about blue shield remains.

2)

Subject - Blue shield
Blue shield absorbs both damage and knockback. Is there a way how to make it absorb only damage, so character would be affected by knockback even tough he has blue shield?
I ask because then I could simulate throwing over obstacles with throws via PAR3. Now I cannot due to blue shield's knockback absorbtion.
Or is there any "cleaner" solution of throwing over obstacles (such as dynamic root height)?

Thank you for patience, --Loser 07:45, 30 November 2008 (CET)

I'll say what I can on the matter, if you don't mind. :)
@Blue Shield: Regardless of the ability to remove damage by knockback, you run into several problems:
  • Explosions would still knock you back
  • Explosions _might_ still do damage to you (I'd have to look at the asm, but from what I recall about PAR3, knockback is a type of damage. I never quite got how it worked specifically though, does it do actual damage?)
A better solution would be to somehow apply velocity to TRAMs. With velocity and the right flag (can't recall which...), the sphere tree would unstick.
Another thing: When a character goes over an edge, unsticking depends on either a time spent in the air or size of sphere (distance from ground), I can't tell which. I would hazard a guess that it has to do with time, but I'm not sure. :) If we can decrease whatever value it is, we could get what you are looking for. There is a chance it is a value in the ONCC or a constant in the engine. I'm not sure which. Gumby 10:04, 30 November 2008 (CET)
@TRAMs when characters die, they lose all ability to be animated at all. I know there exists a fix for characters losing MELE information on death (I lost it, gotta ask geyser next time he is on...), but there might also be a way to disable the disabling of animation on death. I know if you set a characters health to 0, attempt to animate it (fail), then set its health to something positive, the first thing he\she does is that animation you asked it to. So all hope is not lost. :) Then again, it might be a good thing you can't be animated after death. That could lead to some crazy bugs. :D Gumby 09:38, 30 November 2008 (CET)

OK, the new music files imports and exports without error. Now how to get it in the game? I duplicated OSBDmus_amasian.grp renamed it OSBDmus_burn.grp used a hex editor and changed the links to the new music file names (I kept the file name the same size) Placed all the files in level0_Final and rebuilt the level and used the command: sound_music_start mus_burn but no music... here are the files http://edt.oni2.net/OniSplit/mus_burn.zip What am I doing wrong? EdT 20:57, 10 December 2008 (CET)

The OSBD files appear to be correct but to be on the safe side you should simply replace exiting sounds (SNDD) to see if the sound really imported correctly.

Neo

Replacing an existing SNDD with a new one works. I next tried duplicating an existing OSBD file such as OSBDmus_xtr1.grp.oni and renamed it OSBDmus_xtr3.grp.oni, rebuilt level0_Final, but when I use the command sound_music_start mus_xtr3 there is no music. Very odd... EdT 01:15, 11 December 2008 (CET)

I think that the sound_music_start command plays an ambient sound, not a group. In general nothing plays groups, only ambients and impulses so you need to create one of those too.

Neo

Looks like group files are used by ambient files. Example on "fight" track.

SNDDmus_fitec1.aif.oni
SNDDmus_fitec2.aif.oni
SNDDmus_fitec3.aif.oni
SNDDmus_fitec4.aif.oni
SNDDmus_fitec5.aif.oni
SNDDmus_fitec_out.aif.oni
- (no links)

OSBDmus_fitec.amb.oni (for level 4 ?)
- mus_fitec
- mus_fitec_in
- mus_fitec_out

OSBDmus_fitec_hd.amb.oni (for level 12 ? looks redundant)
- mus_fitec
- mus_fitec_in
- mus_fitec_out

OSBDmus_fitec_in.grp.oni
- mus_fitec1.aif

OSBDmus_fitec.grp.oni (should be the loop)
- mus_fitec1.aif
- mus_fitec2.aif
- mus_fitec3.aif
- mus_fitec4.aif
- mus_fitec5.aif

OSBDmus_fitec_out.grp.oni
- mus_fitec_out.aif

Here is the updated mus_burn pack. I guess that track wasn't supposed to become looped so it sounds choppy when starting over. Btw, where did the track come from? Paradox-01 19:04, 8 March 2009 (UTC)



How hard is it to add a new screen to Oni? "Screen" as in Main Menu, Load Game, Options, etc. I know that the game wouldn't know what to do with the screen because it wouldn't have any code written for it, but let's say that part's not important. --iritscen 21:49, 12 December 2008 (CET)

Creating WMDDs using xml is easy enough, export an existing one and modify it as you like. But you're right about the fact that they need new code added to the game.

Neo

I should have mentioned, I wanted an existing screen to lead to a new screen when clicking a newly-added button on the first screen. But, looking at the WMDDs, I don't see where the link is from a button to a screen... is that because they're hard-coded into Oni? :-\ --Iritscen 21:33, 13 December 2008 (CET)

Yes, a button triggers an action that must be written in code.

Neo


Neo, is it possible to make OniSplit say something to the user if they double-click the app, that is, run it without sending it any commands? In other words, right now, the console window just flashes onscreen for a moment if they do that. Could you insert a pause, and display a message about how they need to run it by sending it a command? Maybe it doesn't close the window until they press a key. Just a suggestion. I know that we should probably also be clearer about it in places like OniSplit, but it seems like, if this is doable, it probably would only take a minute to code, and it will save users from having to ask this question every couple weeks on the forum :-) --Iritscen 16:10, 21 December 2008 (CET)


Neo, I used xml to extract and create TXMP files. However, for a file that has an alpha channel, I get a bug: alphabug.jpg

For this example, I extracted the TXMP for Konoko's head using xml and without any changes imported it back using xml.

Any suggestions? EdT

Somehow the reflection got changed into transparency...I have been wondering how this particular trick is done. :) I guess we will find out soon enough. Gumby 05:06, 26 June 2009 (UTC)
EdT, maybe you could post the generated xml file? :) Gumby 07:11, 26 June 2009 (UTC)