Oni (folder)/GameDataFolder: Difference between revisions

→‎Notes: general updates
m (alignment fix)
(→‎Notes: general updates)
Line 133: Line 133:


==Notes==
==Notes==
===level0_Final and IGMD\global===
===level0_Final===
IGMD\global\ is not present by default, but if it is created, any scripts placed in it will load for all levels; this works only with the PC retail engine: the Mac engines and the PC demo always ignore the global folder. The level0_Final instance file is only loaded once, when Oni starts.
The level0_Final instance file is only loaded once, when Oni starts.
 
===IGMD\global===
IGMD\global\ is not present by default, but if it is created, any scripts placed in it will load for all levels; however, the PC demo engine ignores the global folder.


===Movie files===
===Movie files===
RAD Game Tools, the makers of the Bink video format, offer [http://www.radgametools.com/bnkdown.htm standalone apps] for all platforms if you want to watch the .bik files on their own (Mac users, pick the Carbon Player, the OS X versions seem to be glitched). The movie files are not needed for Oni to run. You can thus rename or move intro.bik out of GameDataFolder so Oni starts faster. You can also delete both files permanently and gain over 100 MB of hard disk space.
RAD Game Tools, the makers of the Bink video format, offer [http://www.radgametools.com/bnkdown.htm standalone apps] for all platforms if you want to watch the .bik files on their own. The movie files are not needed for Oni to run. You can thus rename or move intro.bik out of GameDataFolder so Oni starts faster.


===How Oni finds its GameDataFolder===
===How Oni finds its GameDataFolder===
In Windows, Oni's engine first looks up GDF in the [[wikipedia:working directory|working directory]] (a.k.a. "."). If ".\GameDataFolder" is missing, Oni tries parent folders all the way up to ther root (i.e., it looks for "..\GameDataFolder", "..\..\GameDataFolder", etc). As a last resort, it looks for ".\OniEngine\GameDataFolder". Here are two examples.
In Windows, Oni's engine first looks up GDF in the [[wikipedia:working directory|working directory]] (a.k.a. "."). If ".\GameDataFolder" is missing, Oni tries parent folders all the way up to the root (e.g., it looks for "C:\Program Files\Oni\GameDataFolder", then "C:\Program Files\GameDataFolder", then "C:\GameDataFolder"). As a last resort, it looks for ".\OniEngine\GameDataFolder" the same way.
*If Oni was installed into C:\Program Files\Oni and is called from that folder (e.g. by double-clicking the executable or the shortcut generated during installation), Oni will first look for "C:\Program Files\Oni\GameDataFolder". If it's missing, it will try "C:\Program Files\GameDataFolder", then "C:\GameDataFolder", and finally "C:\Program Files\Oni\OniEngine\GameDataFolder".
 
*Same as above, but with the [[AE|Edition]] installed. There is a folder called "C:\Program Files\Oni\edition", which holds  a working copy of GameDataFolder and scripts that "remotely" run Oni (the engine is still in "C:\Program Files\Oni"). If you double-click the scripts, the working directory is "C:\Program Files\Oni\edition", so Oni will first look for "C:\Program Files\Oni\edition\GameDataFolder", and if it's missing it will try "C:\Program Files\Oni\GameDataFolder", "C:\Program Files\GameDataFolder", "C:\GameDataFolder", and finally "C:\Program Files\Oni\edition\OniEngine\GameDataFolder"
Early versions of the [[Daodan DLL|C-Daodan]] discarded the notion of working directory and used the engine's directory instead; the feature will probably be brought back, for backwards compatibility.
Early versions of the [[Daodan DLL|C-Daodan]] discarded the notion of working directory and used the engine's directory instead; the feature will probably be brought back, for backwards compatibility.


On the Mac, the location of the GDF is stored in a preferences file (~/Library/Preferences/com.godgames.oni.plist). Oni therefore does not search for a GDF, it merely checks to see if the last-known location of the GDF is still valid. If not, it presents an open dialog box that allows the user to pick a new GDF (technically it wants the location of the folder that <u>contains</u> the GDF), then saves the new location in its prefs file. To change the GDF that Oni uses, rename it, then open Oni, and when the dialog box appears, you can fix the name of the GDF and then switch back to Oni and pick a new one in the dialog box.
The Mac Oni app follows the same search pattern for GameDataFolder/, but does not look for OniEngine/GameDataFolder/.


[[Category:Game directory map]]
[[Category:Game directory map]]