Jump to content

SceneNavi - A simple Ocarina of Time level editor


xdaniel
 Share

Recommended Posts

Rinku: I think it was Strati who documented those a while ago on the forums here, checking where it was exactly... *searches*

 

...and there it is: https://www.the-gcn.com/topic/2471-the-beginners-guide-to-music-antiqua-teasers/?do=findComment&comment=40641 - Think I'll make this a drop-down list, too, in the next build.

Link to comment
Share on other sites

I see, thank you for searching this! I will add it to the wiki and credit Strati.

 

I thought day and night were different scene headers (the main header and the first alternate header), but if the music changes because of this command, does that mean that day and night are in fact the same scene header?

Link to comment
Share on other sites

The following may be false, it's only a supposition:

 

OFF TOPIC:
 

Well, I think scenes with day and night cycle (Hyrule Field, Zora River) havethe same scene header for both day and night; at daytime the track plays, atnighttime the SFX.

 

Scenes with both a day and night version but without cycle (Kakariko, Lon LonRanch) have separate scene headers for day and night. The first one is set tostay at daytime and plays the area track, the second one is set to stay atnighttime and plays the nighttime SFX. 

haddockd, would you like to have music play at nighttime? I don't know if itis possible, as the nighttime SFX seem to play automatically when it "is dark",when the scene time is set at nighttime.

 

Enough offtopic, I'm sorry for this.

Link to comment
Share on other sites

Speaking of the headers, I've been wondering... Seeing how the room(s) of a scene appear to always have the same amount of headers that the scene itself has, and appear to be directly related to each other just by their index, should I try to group things into "stages" in the way the Map Select does?

 

I mean, for example, instead of going "Ice Cavern -> Scene Header 0xF6A0 -> ice_doukutu_room_0 -> Room Header 0x100" the treeview would go something like "Ice Cavern -> Header #2 [maybe description here, if feasible? Like "Cutscene: Learning Serenade of Water"] -> ice_doukutu_room_0", without a separate room header selection. I guess that would make it easier on people who have no idea what in the world a "scene header" is or why it's important.

  • Like 1
Link to comment
Share on other sites

This sounds interesting. I think the scene and room headers are related to each other by their index , as you say.

If this is not proven false, it would in fact be more intuitive, simple (and faster to work with) to group them into "Stages" .

 

Nice idea!

Link to comment
Share on other sites

Exchanged the alternate scene header pointers of Hyrule Field's intro and nightmare cutscenes - changed data at 0x27D6074 in ROM to "02011D60", and data at 0x27D6080 to "02011AD0" - and got this when I ran the game and pressed A (technically, when I messed around a bit first, then restarted the cutscene and pressed A):

 

 

Posted Image

 

 

...so unless I'm a complete moron (please point out if I am and why), this might be proof of those relations...

 

Link to comment
Share on other sites

 

Well, I think scenes with day and night cycle (Hyrule Field, Zora River) havethe same scene header for both day and night; at daytime the track plays, atnighttime the SFX.

 

Scenes with both a day and night version but without cycle (Kakariko, Lon LonRanch) have separate scene headers for day and night. The first one is set tostay at daytime and plays the area track, the second one is set to stay atnighttime and plays the nighttime SFX. 

haddockd, would you like to have music play at nighttime? I don't know if itis possible, as the nighttime SFX seem to play automatically when it "is dark",when the scene time is set at nighttime.

 

This isn't quite right. Kakariko has 1+3 headers for day/night child/adult. The headers simply stop time, rather than being set at a specific time point. You can observe this if you walk into Kakariko at sunset, where actors still take their daytime positions but no music is playing (the SFX seems slightly different than true night time though). Furthermore the nighttime headers for Kakariko are all set to play the daytime version of it's song, so if time wasn't stopped it'd probably behave exactly like Hyrule Field does so long as you don't leave Kakariko.

 

@Dan, what interests me more is whether you can omit the 18 command for a map when the scene file contains one, allowing you to cut out extra data for maps that don't change over time, or during a cutscene. 

Link to comment
Share on other sites

I think it would be pretty cool to give an option to actually be able to edit if an area has a normal flow of time like in Hyrule Field, or if time stands still. I already know how to do this through hex, but it would be nice for people who are just getting started at hacking OoT, and it would probably save time for those who knew how to do it manually anyways.

Link to comment
Share on other sites

mzxrules-> Oh, thanks, now I understand the details better. Totally forgot about sunset! So you are still in the day header, but the nighttime SFX already plays.

 

xdaniel-> So you exchanged the scene header offset pointers, and then the nightmare scene header (proven by rain and dark sky) got "connected" to the intro room header (proven by intro actor). In fact, this proves true that scene and room headers are connected just by their index. That's great!

 

I tried to made the changes you made, but I got other results. My intro was normal, only the nightmare was changed.

 

Heavy-> I think xdaniel is planning to add it soon in the "Scene Metadata" tab.

Link to comment
Share on other sites

mzxrules: As in, leave the 0x18 command out of the room/map files, but leave it in the scene itself? Not sure if that'll work... If the game really looks them up like "SceneHeaders[stageNumber]" and "RoomHeaders[stageNumber]", it'll probably just read garbage data for the room headers then, seeing how the 0x18 command needs to specify the alternate header's offsets...

 

Rinku: I basically made the alternate header list point to the nightmare instead of the intro, and to the intro instead of the nightmare. The result was that the intro used the nightmare cutscene's camera angles, etc., but that ex. no actors appeared, presumably because the intro's room actors were loaded, not the correct nightmare ones.

 

Also, yeah, the Scene Metadata tab (and maybe a separate Room Metadata one, depending on how I'll do the GUI) is planned to have a bunch more options, including timeflow, skybox settings, etc.

 

Finally, I changed the treeview as per the above findings/assumptions; still needs some more sanity checks and general testing:

 

 

Posted Image

 

 

And for those curious, the corresponding XML document for the stage descriptions is called StageDescriptions.xml, resides in each ROM version's folder in GameDataSpecific, and looks like this:

 

 

 

<?xml version="1.0" encoding="utf-8" ?><Table KeyType="SceneNavi.HeaderLoader+StageKey" ValueType="System.String">  <Element Key="0x025CC000, 0">Normal Gameplay</Element>  <Element Key="0x025CC000, 1">Cutscene: Learning Serenade of Water</Element></Table>

 

(Element Key is scene address in ROM, followed by header index, btw)

 

 

Link to comment
Share on other sites

â–²ChriisTiianâ–²: Uhm, "textures of selected area"? I'm not sure what you mean by that...?Heavy: If you mean the texture exporter/importer I was working on ages ago, that wasn't just for the title screen logo, but supposed to be for any kind of texture, in any kind of N64 format, in any N64 game. If I remember correctly, I dropped it because I never finished the importing side of things (or what I had for that was crap, or something like that). And I won't add anything like that to SceneNavi; the area title card is all it'll be able to edit, texture-wise, and I only added that feature because the scene table happens to provide the offsets anyway. It's pretty much just a happy little accident.

 

Link to comment
Share on other sites

â–²ChriisTiianâ–²: Uhm, "textures of selected area"? I'm not sure what you mean by that...?Heavy: If you mean the texture exporter/importer I was working on ages ago, that wasn't just for the title screen logo, but supposed to be for any kind of texture, in any kind of N64 format, in any N64 game. If I remember correctly, I dropped it because I never finished the importing side of things (or what I had for that was crap, or something like that). And I won't add anything like that to SceneNavi; the area title card is all it'll be able to edit, texture-wise, and I only added that feature because the scene table happens to provide the offsets anyway. It's pretty much just a happy little accident.

 

 

Damn, i need learn more english.. -.-'

 

 

I mean, for example:
 
Open in SceneNavy the "Forest Temple"...
So, will be good if you can edit the textures of that area, for example, the grass, walls, etc...
 
You understand now or i need learn more and more english? :c
Link to comment
Share on other sites

â–²ChriisTiianâ–²: Okay, I get it now, but I don't think I'll be adding this feature either. I feel like that would be 1) kinda out of the scope of the project and 2) too much work to implement in it. There's also other more important things I still need to work on in SceneNavi (the Scene Metadata tab, etc), and the area title card editing was as mentioned just an accident, although a positive one.

 

That said, I might, emphasis on MIGHT, someday look into making a separate texture importer/exporter or fix up the one I started, which you could use for scene/room textures or ex. the title screen, but do not expect this to happen and do not hold me to this statement.

  • Like 1
Link to comment
Share on other sites

I'd like to know why SceneNavi supports custom maps converted by SharpOcarina but not Hylian Toolbox. When I load the scene and map from Hylian Toolbox, I get a huge error, causing the screen to turn into a red X.

 

 

See the end of this message for details on invoking 

just-in-time (JIT) debugging instead of this dialog box.
 
************** Exception Text **************
System.OverflowException: Value was either too large or too small for a UInt16. ---> System.OverflowException: Value was either too large or too small for a UInt32.
   at System.Decimal.ToUInt32(Decimal d)
   at System.Decimal.ToUInt16(Decimal value)
   --- End of inner exception stack trace ---
   at System.Decimal.ToUInt16(Decimal value)
   at SceneNavi.MainForm.nudColPolyType_ValueChanged(Object sender, EventArgs e) in C:\Users\Daniel\Documents\Visual Studio 2010\Projects\SceneNavi\SceneNavi\MainForm.cs:line 1535
   at System.Windows.Forms.NumericUpDown.OnValueChanged(EventArgs e)
   at System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
   at System.Windows.Forms.NumericUpDown.set_Maximum(Decimal value)
   at SceneNavi.MainForm.RefreshCollisionPolyAndTypeLists() in C:\Users\Daniel\Documents\Visual Studio 2010\Projects\SceneNavi\SceneNavi\MainForm.cs:line 1484
   at SceneNavi.MainForm.RefreshCurrentData() in C:\Users\Daniel\Documents\Visual Studio 2010\Projects\SceneNavi\SceneNavi\MainForm.cs:line 555
   at SceneNavi.MainForm.tvScenes_AfterSelect(Object sender, TreeViewEventArgs e) in C:\Users\Daniel\Documents\Visual Studio 2010\Projects\SceneNavi\SceneNavi\MainForm.cs:line 758
   at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
   at System.Windows.Forms.TreeView.WmNotify(Message& m)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 
 
************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1008 (RTMGDR.030319-1000)
----------------------------------------
SceneNavi
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.1.6
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1002 built by: RTMGDR
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
----------------------------------------
OpenTK
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.804.3121
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.225 built by: RTMGDR
----------------------------------------
OpenTK.GLControl
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.804.3121
----------------------------------------
QuickFont
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1015 (RTMGDR.030319-1000)
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1015 built by: RTMGDR
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
----------------------------------------
 
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
 
For example:
 
<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>
 
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Link to comment
Share on other sites

System.OverflowException: Value was either too large or too small for a UInt16. ---> System.OverflowException: Value was either too large or too small for a UInt32.
^ There might be something wrong with the file, post the file in question, or something that causes the same issue.
Link to comment
Share on other sites

Now that I've got some time...

 

int ptlen = (int)(PolygonArrayOffset - PolygonTypeOffset);   /* Official maps */
if (ptlen <= 0) ptlen = (int)(WaterboxOffset - PolygonTypeOffset);   /* SO imports */
if (ptlen <= 0) ptlen = (int)(this.GetAddressGeneric() - PolygonTypeOffset);   /* HT imports */

 

Basically the problem is detecting where the polygon type definitions end as they don't have a set count. Official maps all have the polygon array directly following the polygon types, so that's easy to detect. SO assigns a waterbox offset regardless of if there's any waterboxes defined, and those would directly follow the polygon types.

 

I had simply not used HT when I initially wrote this part of SceneNavi - in fact, I still haven't used it much - so I didn't know if HT stored its generated data any different from either the actual game or SO. I only learned about this when I got a bug report on Maco regarding this very same problem, and lo and behold: In HT-generated scenes, the collision header follows right after the polygon types, neither the polygon array nor the waterboxes. This has been fixed for Beta 7, as I posted on Maco a few days ago.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.