Daodan DLL: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(re-working of layout and instructions)
(→‎All Configuration Settings: oops, forgot to add this when v3.9 came out)
(41 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The Daodan DLL is a modification for Oni that hooks into the game engine and applies bug fixes and patches. It also replaces parts of the engine with its own code. The Daodan fixes many issues, including the famous "[[Blam|Blam!]]" error that occurs on modern Windows machines. It also adds new features such as support for extra screen resolutions (including many widescreen resolutions) and bonus cheat codes.
:''This is a Windows-only patch. For a list of changes to the Mac Oni application, see [[AE:FERAL|here]].''
 
:''Subpages:'' [[/Change_log|Daodan DLL change log]]
 
The Daodan DLL is a patch for Oni for Windows that hooks into the game engine to fix bugs and add features. It does this by posing as '''binkw32.dll''', the library that Oni loads so that it can play the game's opening and ending videos. The Daodan fixes issues such as the famous "[[Blam|Blam!]]" error that occurs on modern machines. It also adds new features such as support for widescreen resolutions and bonus cheat codes.
{{TOCfloat}}
{{TOCfloat}}
==C-Daodan==
==C-Daodan==
This is the recommended version of the Daodan DLL. This is also the only version that supports windowed mode.
<div style="overflow:hidden">This is the recommended version of the Daodan DLL. Note that you '''already have this installed''' if you installed the [[Anniversary Edition]].
 
[http://mods.oni2.net/node/233 Download C-Daodan (binkw32.dll) and corresponding Oni.exe]


===Installation instructions===
===Installation instructions (for non-[[AE]] users)===
1. Before installation, it is important to know where your copy of Oni has been installed to. For most people, it is stored in "C:\Program Files\Oni". This folder should contain a "GameDataFolder" and "Oni" or "Oni.exe".
1. Download the AE package that contains the Daodan DLL from [http://mods.oni2.net/node/233 here]. The files you need are in the win_only\ directory.<br />
2. Find where your copy of Oni has been installed to. For most people, it is stored in "C:\Program Files\Oni". This folder should contain a "GameDataFolder" and "Oni" or "Oni.exe". Back up your Oni.exe by renaming it (e.g. "Oni-original.exe").<br />
3. Place the newly-downloaded Oni.exe, binkw32.dll, realbink.dll, and assorted files into the Oni\ folder.<br />
4. To test if you have done everything correctly, run "Oni.exe". Enter the pause (Diary) screen (F1 by default) and type "tellmetheversion"; if you get a result like "Daodan v.''x.y''", the DLL is working.


2. Back up your Oni.exe by renaming it (e.g. "Oni-original.exe").
===Troubleshooting===
If the game does not display correctly (for instance, a black window), try the following in any order:


3. Place the newly-downloaded Oni.exe, binkw32.dll, realbink.dll, and assorted files in the folder with Oni.exe.
1. Disable the intro movie by renaming GameDataFolder\intro.bik. This often fixes the game window.<br />
2. Open the daodan.ini in Notepad and set either "daodangl" or "windowhack" to true. "windowhack" should at least center the window on the screen.<br />
3. Try [http://www.google.com/search?q=windows+run+as+administrator launching Oni as Administrator].<br />
4. Make the Oni folder writable by un-checking "Read-only" in the Properties window for the folder.<br />
5. Try both the run_full and run_wind scripts.


4. To test if you have done everything correctly, run "Oni.exe". Enter the pause (Diary) screen (F1 by default) and type "tellmetheversion"; if you get a result like "Daodan v.3.0", the DLL is working.
You can report problems on the forum in [http://oni.bungie.org/community/forum/viewtopic.php?id=1686 this thread] or in a new thread in the Modifications forum.
 
</div>
If the game does not display correctly (for instance, a black window), open the daodan.ini in Notepad and set either "daodangl" or "windowhack" to true. Also try [http://www.google.com/search?q=windows+run+as+administrator launching Oni as Administrator], and using both the run_full and run_wind scripts to launch Oni. You can report problems on the forum in [http://oni.bungie.org/community/forum/viewtopic.php?id=1686 this thread] or in a new thread in the Modifications forum.
<br clear="all" />
===Feature summary===
===Feature summary===
*Windows XP patch - Fixed Oni crashing at startup on modern computers.
*Windows XP patch - Fixed Oni crashing at startup on modern computers.
Line 29: Line 37:
*Stops fly-in character portraits from being stretched when playing in widescreen.
*Stops fly-in character portraits from being stretched when playing in widescreen.


===Settings===
===Developer Mode===
====Patches====
The DLL enables [[Developer Mode]]; go to the pause screen (F1) and type "thedayismine" or simply 'x' to activate it.
Creating a file called Daodan.[[wikipedia:INI_file|ini]] in the same directory as the Daodan DLL will allow you to enable/disable the patches inside Daodan. It can also be used to store configuration settings and language items. Each setting is stored inside a section as a name and value pair.
 
To enable a patch, look for the patches section in your Daodan.ini. If the patches section doesn't exist, create it by typing
[Patch]
at the end of your file.
You can now enable or disable patches by typing the patch name followed by '''=True''' or '''=False''' (caps and spacing don't matter). For example, let's say you want to turn off the cooldown timer patch (so you can drop and pick up the Mercury Bow after firing to fire again immediately) and the new windowed mode makes your game crash or makes it run slowly:
[Patch]
CooldownTimer = False
WindowHack = False
All patch names are found in the "All patches" section below.
 
====Options====
With an unpatched Oni, the only way to change settings such as windowed mode was to create a batch file (.bat) and type command line options into it. In the beta Daodan, options can be added to the Daodan.ini. To add an option, look for the options section or type
[Options]
at the end of your Daodan.ini.
To enable windowed mode by default, type:
[Options]
Switch = False
Similarly, to disable sound, add the line:
[Options]
Switch = False
Sound = False
A list of options can be found in the "All options" section below.


====Languages====
===Languages===
The Daodan DLL offers support for the Chinese version of the game as well as multibyte languages in general (see "multibyte" under "Patches" section). It also has the beginnings of some basic localization support, by allowing cheat code names and other strings to be translated. To add an option, look for the options section or type
The Daodan DLL offers support for the Chinese version of the game as well as multibyte languages in general (see "multibyte" under "Patches" section). It also has the beginnings of some basic localization support, by allowing cheat code names and other strings to be translated. To add an option, look for the options section or type
  [Language]
  [Language]
Line 84: Line 69:
|}
|}


====Command-line arguments====
===Configuration===
Creating a file called Daodan.[[wikipedia:INI_file|ini]] in the same directory as the Daodan DLL will allow you to configure which patches are enabled, as well as to store configuration settings and language items.
 
On modern versions of Windows (starting with Windows Vista), Oni does not properly request write access to the directory containing Oni.exe (i.e. C:\Program Files (x86)\Oni in typical installs). Windows detects this, and creates a dedicated directory for Oni.exe (and thus Daodan.DLL) to write its files to, located in C:\Users\<Your Username>\AppData\Local\VirtualStore. The directory for Oni will reflect its relative path on disk, so in a typical install, it will be at VirtualStore\Program Files (x86)\Oni. This is where all files output by the program (startup.txt, persist.dat, key_config.txt, etc.) will be located when Oni is not run as an administrator. '''This is the location where Daodan.ini must be placed if Oni is to be run as a non-administrator.'''
 
Inside of the Daodan.ini file, each configuration setting is stored inside a section as a name and value pair. To temporarily disable a setting in the INI, add a '#' to the beginning of the line and the Daodan will ignore it.
 
As of Daodan v3.7, configuration entries in Daodan.ini are stored in several different sections. To change an entry, add it to the relevant section. If the section does not yet exist, add it to the end of the file and add relevant entries under it. If any entry is omitted, it is set to its default value. Entries are case-insensitive, and spacing does not matter.
 
Here is an example Daodan.ini file. This example sets the devmode section items to their defaults and disables the cooldown timer patch:
[Devmode]
highres_console = True
showtriggervolumes = True
[gameplay]
CooldownTimer = False
 
Daodan.ini may contain the following sections (names are case-insensitive):
* devmode ''(Developer Mode Configuration)''
* gameplay ''(Gameplay Configuration)''
* graphics ''(Graphics Configuration)''
* language ''(Language Configuration)''
* modding ''(Modding Configuration)''
* oni ''(Original Oni Options Configuration)''
* windows ''(OS Interaction Options)''
 
For names of all entries, and a brief help, see the "All Configuration Settings" section below for more information.
 
===Command-line arguments===
[[Customizing#Command-line_arguments|Command line options]] are still present in the beta Daodan although the syntax is a little different (and a bit more powerful.) The basic syntax for a command line option is this:
[[Customizing#Command-line_arguments|Command line options]] are still present in the beta Daodan although the syntax is a little different (and a bit more powerful.) The basic syntax for a command line option is this:
  -<ini section>.<name> <value>
  -<ini section>.<name> <value>
Line 93: Line 106:
Options or patches specified on the command line take precedence over options specified in Daodan.ini. Currently Oni's command line parser isn't powerful enough to parse language elements (no support for quoting arguments); this will be fixed in a later release.
Options or patches specified on the command line take precedence over options specified in Daodan.ini. Currently Oni's command line parser isn't powerful enough to parse language elements (no support for quoting arguments); this will be fixed in a later release.


===All patches===
===All Configuration Settings===
Below are the names of the patches you can turn on and off in Daodan.ini (names are case-insensitive). Also noted is whether the DLL has this patch turned on or off by default.
Below are the names of the configuration settings you can turn on and off in Daodan.ini (names and sections are case-insensitive). Also noted is whether the DLL has this patch turned on or off by default.
{| class="wikitable"
{| class="wikitable"
!INI name
!INI Section
!INI Name
!Default
!Default
!Description
!Description
|-
|-
|alttab
|[devmode]
|highres_console
|true
|true
|Allows user to switch applications while in Oni (Alt-Tab) and use Windows key, however it may enable the screensaver as well.
|Fixes bug where console line becomes invisible at higher resolutions.
|-
|-
|argb8888
|[devmode]
|showtriggervolumes
|true
|true
|Textures using ARGB8888 can be used.
|Allows BSL variable "show_triggervolumes" and Ctrl+Shift+X (in devmode) to work.
|-
|-
|bsl
|[gameplay]
|bindablecheats
|true
|true
|Enables d_regen (unfinished) and prevents fly-in portraits from being stretched when playing in widescreen resolutions.
|Enables cheats to be bound to keys using key_config.txt. Requires "customactions" and "cheattable" to be on.
|-
|-
|cheater
|[gameplay]
|characterawareness
|true
|true
|Adds new cheat codes (see section below).
|Prevents AIs from forgetting about you when they are pursuing you and lose sight of you.
|-
|-
|[gameplay]
|cheatsenabled
|cheatsenabled
|true
|true
|Enables cheats without having to beat the game first.
|Enables cheats without having to beat the game first. Required for using 'tellmetheversion'.
|-
|-
|[gameplay]
|cheattable
|cheattable
|true
|true
|Replaces Oni's cheat table with table that includes new cheats (see section below).
|Replaces Oni's cheat table with table that includes new cheats (see section below). Required for using 'tellmetheversion'.
|-
|-
|[gameplay]
|cooldowntimer
|cooldowntimer
|true
|true
|Disables weapon cooldown exploit.
|Disables weapon cooldown exploit, e.g. dropping the Mercury Bow and picking it back up right away to reset weapon cooldown.
|-
|[gameplay]
|customactions
|true
|Allows new bindable actions to be registered with the DLL, such as bindable cheats (if "bindablecheats" is on).
|-
|[gameplay]
|kickguns
|false
|EXPERIMENTAL! Unfinished, do not use.
|-
|[gameplay]
|pathfinding
|true
|Multiplies size of pathfinding grid cache by eight in order to prevent crashes in large levels.
|-
|[gameplay]
|projaware
|true
|Allows AI to dodge incoming gunfire properly.
|-
|[gameplay]
|throwtest
|false
|EXPERIMENTAL! Enables experimentation with allowing enemies to be thrown over railings.
|-
|[gameplay]
|wpfadetime
|true
|Adds working function for existing BSL command wp_fadetime, sets fade time to 4800.
|-
|-
|daodandisplayenum
|[graphics]
|binkplay
|true
|true
|Offers more display modes in the Options menu.
|Fixes binkplay calls to use GDI and outro same mode as intro.
|-
|-
|daodaninit
|[graphics]
|daodangl
|true
|true
|If option (not patch) "usedaodanbsl" is also set to true, adds new Daodan BSL functions (documented below).
|Provides an improved windowed mode (-noswitch); this patch is known to break the hiding of the Windows taskbar in fullscreen mode.
|-
|-
|directinput
|[graphics]
|displayenum
|true
|true
|Forces on DirectInput.
|Offers a more accurate list of available display modes in the Options menu.
|-
|-
|disablecmdline
|[graphics]
|gamma
|true
|true
|Replaces existing command line parser with Daodan's in order to add new commands. Meant to be used with getcmdline.
|Enables gamma slider in fullscreen, disables it in windowed mode.
|-
|-
|fonttexturecache
|[graphics]
|newweap
|true
|true
|Doubles size of font texture cache.
|Enables weapon info, so that standing above a weapon displays a message containing the weapon name and amount of ammo.
|-
|-
|getcmdline
|[graphics]
|optionsvisible
|true
|true
|Replaces existing command line parser with Daodan's in order to add new commands. Meant to be used with disablecmdline.
|Enables always showing the options button in main menu, even when pausing from a game.
|-
|-
|kickguns
|[graphics]
|showalllasersights
|false
|false
|Unfinished, do not use.
|Enables visibility of all (also enemies') weapon lasersights
|-
|-
|killvtune
|[graphics]
|REMOVED
|widescreenportraits
|Would prevent loading of vtuneapi.dll.
|true
|Prevents fly-in portraits from being stretched when playing in widescreen resolutions.
|-
|-
|largetextures
|[language]
|chinese
|true
|true
|Textures up to 512x512 can be used.
|Allows Chinese fonts to be shown if the required DLL is available.
|-
|-
|levelplugins
|[language]
|fonttexturecache
|true
|true
|Allows level files to be loaded from the GDF which do not end in "_Final".
|Doubles size of font texture cache.
|-
|-
|multibyte
|[language]
|false
|language
|en
|Sets localization for hardcoded strings (e.g. "Savepoints").
|-
|[language]
|nomultibyte
|true
|Enables languages which use multibyte coding (such as Chinese).
|Enables languages which use multibyte coding (such as Chinese).
|-
|-
|newweap
|[modding]
|argb8888
|true
|Enables the use of textures using ARGB8888.
|-
|[modding]
|d_regen
|true
|true
|Picking up a weapon displays a message containing the weapon name and amount of ammo.
|Enables script command d_regen (query/set regeneration for any character).
|-
|-
|particledisablebit
|[modding]
|false
|daodanbsl
|Unlocks particle action disabling/enabling bits for all events so that a particle event can occur multiple times.
|true
|Adds new BSL commands (see below).
|-
|-
|pathfinding
|[modding]
|hdscreens_lowres
|true
|true
|Multiplies size of pathfinding grid cache by eight in order to prevent crashes in large levels.
|Allows HD intro/ending screens on game resolutions smaller than 1024x768.
|-
|-
|projaware
|[modding]
|largetextures
|true
|true
|Allows AI to dodge incoming gunfire properly.
|Enables the use of textures up to 512x512.
|-
|-
|safeprintf
|[modding]
|levelplugins
|true
|true
|Replaces Oni's function that prints to startup.txt with a safer one.
|Allows level files that do not end in "_Final" to be loaded from the GDF.
|-
|[oni]
|debug
|false
|Not useful; probably does nothing.
|-
|[oni]
|debugfiles
|false
|Enables function logging; when active, BSL function calls are logged to script_debug.txt.
|-
|[oni]
|findsounds
|false
|Not useful, extends output of sound_list_broken_links.
|-
|-
|throwtest
|[oni]
|ignore_private_data
|false
|false
|Not recommended for use; experiment with allowing enemies to be thrown over railings.
|Disables the loading of 'private data' in level0. Probably has no effect.
|-
|[oni]
|sound
|true
|Enables sound.
|-
|-
|usedaodangl
|[oni]
|switch
|true
|true
|Provides an improved windowed mode (-noswitch); this patch is known to break the hiding of the Windows taskbar in fullscreen mode.
|Enables always switching screen to resolution on Oni's Options screen, making the game fullscreen; opposite of Oni's built-in argument "noswitch".
|-
|-
|usegettickcount
|[windows]
|alttab
|true
|true
|Replaces Oni's timing functions with more accurate ones.
|Allows user to switch applications while in Oni (Alt-Tab) and use the Windows key; however, it may enable the screensaver as well.
|-
|-
|windowhack
|[windows]
|false
|border
|Fallback to be used for simpler windowed mode hack instead of "usedaodangl".
|true
|Adds a border in windowed mode if '[graphics] daodangl' is active.
|-
|-
|wpfadetime
|[windows]
|clipcursor
|true
|true
|Adds working function for existing BSL command wp_fadetime, sets fade time to 4800.
|Limits cursor to Oni's window.
|}
 
===All options===
Below are the names of the options you can turn on and off in Daodan.ini (names are case-insensitive). Also noted is whether the DLL has this option turned on or off by default.
{| class="wikitable"
!INI name
!Default
!Description
|-
|-
|border
|[windows]
|directinput
|true
|true
|If "windowhack" patch is active, make sure game window has border in windowed mode.
|Forces on DirectInput. Should be off for Linux/Wine.
|-
|-
|multibyte
|[windows]
|false
|disablecmdline
|Redirects to patch "multibyte"; see "Patches" section.
|true
|Disables Oni's existing command line parser as Daodan has its own.
|-
|-
|shadow
|[windows]
|killvtune
|false
|false
|If "windowhack" patch is active, make sure game window has shadow in windowed mode.
|Prevents loading of vtuneapi.dll.
|-
|-
|switch
|[windows]
|safeprintf
|true
|true
|Always switch screen to resolution on Oni's Options screen, making the game fullscreen; opposite of Oni's built-in argument "noswitch".
|Replaces Oni's function that prints to startup.txt with a safer one.
|-
|-
|[windows]
|topmost
|topmost
|false
|false
|Keep game window on top in windowed mode, even when switching applications.
|Keeps game window on top in windowed mode, even when switching applications.
|-
|-
|usedaodanbsl
|[windows]
|usegettickcount
|true
|true
|Adds new BSL commands (see below) as long as patch "daodaninit" is true.
|Replaces Oni's timing functions with more accurate ones.
|-
|''various''
| --
|Oni's built-in arguments; see [[Customizing#Command-line_arguments]].
|}
|}


Line 284: Line 380:
:Gets or sets a character's name
:Gets or sets a character's name
* string '''d_regen''' [ai_name:str | script_id:int] on_off:bool
* string '''d_regen''' [ai_name:str | script_id:int] on_off:bool
:Currently broken, won't do anything
:Gets or sets a character's regeneration (like elderrune for the player)
* int '''d_getindex''' [ai_name:str]
* int '''d_getindex''' [ai_name:str]
:Gets a character's script_id from their name
:Gets a character's script_id from their name
Line 321: Line 417:
* string '''sprintf''' str1:format ...
* string '''sprintf''' str1:format ...
:Does a C-style sprintf operation on a string
:Does a C-style sprintf operation on a string
===Developer Mode===
The DLL enables [[Developer Mode]]; go to the pause screen (F1) and type "thedayismine" or simply 'x' to activate it.
===Custom screen resolutions===
If you wish to run in a screen resolution that is not available and you are running the recommended version of C-Daodan, create a text file (Notepad document) called "res.txt" in your Oni folder (C:\Program Files\Oni) containing a list of custom resolutions in this format (one resolution per line):
800x600<br />
1024x600<br />
1024x768


==FASM-Daodan (old)==
==FASM-Daodan (old)==
There is also a much older release of Daodan, referred to as FASM-Daodan. This is the original version by SFeLi. Unlike the C-Daodan, FASM-Daodan requires a different DLL to be downloaded depending on which Oni.exe is used. It does not support the newer Daodan features, such as windowed mode and custom resolutions, however it still contains the basic patches such as the Windows XP patch and the custom cheats.
'''Note: Unsupported by community.''' There is also a much older release of Daodan, referred to as FASM-Daodan. This is the original version by SFeLi. Unlike the C-Daodan, FASM-Daodan requires a different DLL to be downloaded depending on which Oni.exe is used. It does not support the newer Daodan features, such as windowed mode and custom resolutions, however it still contains the basic patches such as the Windows XP patch and the custom cheats.


[http://sfeli.oni2.net/daodan/basic-0.6.6.zip Download a ZIP containing the DLLs for each version.]
[http://sfeli.oni2.net/daodan/basic-0.6.6.zip Download a ZIP containing the DLLs for each version.]

Revision as of 12:15, 18 November 2015

This is a Windows-only patch. For a list of changes to the Mac Oni application, see here.
Subpages: Daodan DLL change log

The Daodan DLL is a patch for Oni for Windows that hooks into the game engine to fix bugs and add features. It does this by posing as binkw32.dll, the library that Oni loads so that it can play the game's opening and ending videos. The Daodan fixes issues such as the famous "Blam!" error that occurs on modern machines. It also adds new features such as support for widescreen resolutions and bonus cheat codes.

C-Daodan

This is the recommended version of the Daodan DLL. Note that you already have this installed if you installed the Anniversary Edition.

Installation instructions (for non-AE users)

1. Download the AE package that contains the Daodan DLL from here. The files you need are in the win_only\ directory.
2. Find where your copy of Oni has been installed to. For most people, it is stored in "C:\Program Files\Oni". This folder should contain a "GameDataFolder" and "Oni" or "Oni.exe". Back up your Oni.exe by renaming it (e.g. "Oni-original.exe").
3. Place the newly-downloaded Oni.exe, binkw32.dll, realbink.dll, and assorted files into the Oni\ folder.
4. To test if you have done everything correctly, run "Oni.exe". Enter the pause (Diary) screen (F1 by default) and type "tellmetheversion"; if you get a result like "Daodan v.x.y", the DLL is working.

Troubleshooting

If the game does not display correctly (for instance, a black window), try the following in any order:

1. Disable the intro movie by renaming GameDataFolder\intro.bik. This often fixes the game window.
2. Open the daodan.ini in Notepad and set either "daodangl" or "windowhack" to true. "windowhack" should at least center the window on the screen.
3. Try launching Oni as Administrator.
4. Make the Oni folder writable by un-checking "Read-only" in the Properties window for the folder.
5. Try both the run_full and run_wind scripts.

You can report problems on the forum in this thread or in a new thread in the Modifications forum.

Feature summary

  • Windows XP patch - Fixed Oni crashing at startup on modern computers.
  • Windowed mode - Oni runs inside a window.
  • Custom screen resolutions - Includes many more default screen resolutions and the ability to add custom resolutions (see below).
  • BGRA32 (ARGB8888) support.
  • Extra cheats - see "Added cheat codes" section below.
  • Cheats always enabled; no need to beat game first.
  • Extra command line options (for advanced users) - For a list, type "Oni -help".
  • DirectInput is used on NT, XP and Vista - Better support for keyboard layouts.
  • AIs have ability to properly dodge projectiles.
  • Stops fly-in character portraits from being stretched when playing in widescreen.

Developer Mode

The DLL enables Developer Mode; go to the pause screen (F1) and type "thedayismine" or simply 'x' to activate it.

Languages

The Daodan DLL offers support for the Chinese version of the game as well as multibyte languages in general (see "multibyte" under "Patches" section). It also has the beginnings of some basic localization support, by allowing cheat code names and other strings to be translated. To add an option, look for the options section or type

[Language]

To enable Chinese support, type:

[Language]
Chinese = True

This will load a DLL called xfhsm_oni.dll (apparently provided with Chinese copies of Oni).

Here are the strings that you can replace using the .ini file:

INI name Description
blam Replaces body text of the blam window.
damn Replaces title of the blam window.
savepoint Replaces string "Save Point" in Load Game menu (not working?).
syndicatewarehouse Replaces string "Syndicate Warehouse" in Load Game menu (not working?).
nameofcheat_on/_off Replaces name of the built-in cheat code as it appears on the pause screen when code is entered. E.g., "behemoth_on=Gojira Desu!".

Configuration

Creating a file called Daodan.ini in the same directory as the Daodan DLL will allow you to configure which patches are enabled, as well as to store configuration settings and language items.

On modern versions of Windows (starting with Windows Vista), Oni does not properly request write access to the directory containing Oni.exe (i.e. C:\Program Files (x86)\Oni in typical installs). Windows detects this, and creates a dedicated directory for Oni.exe (and thus Daodan.DLL) to write its files to, located in C:\Users\<Your Username>\AppData\Local\VirtualStore. The directory for Oni will reflect its relative path on disk, so in a typical install, it will be at VirtualStore\Program Files (x86)\Oni. This is where all files output by the program (startup.txt, persist.dat, key_config.txt, etc.) will be located when Oni is not run as an administrator. This is the location where Daodan.ini must be placed if Oni is to be run as a non-administrator.

Inside of the Daodan.ini file, each configuration setting is stored inside a section as a name and value pair. To temporarily disable a setting in the INI, add a '#' to the beginning of the line and the Daodan will ignore it.

As of Daodan v3.7, configuration entries in Daodan.ini are stored in several different sections. To change an entry, add it to the relevant section. If the section does not yet exist, add it to the end of the file and add relevant entries under it. If any entry is omitted, it is set to its default value. Entries are case-insensitive, and spacing does not matter.

Here is an example Daodan.ini file. This example sets the devmode section items to their defaults and disables the cooldown timer patch:

[Devmode]
highres_console = True
showtriggervolumes = True

[gameplay]
CooldownTimer = False

Daodan.ini may contain the following sections (names are case-insensitive):

  • devmode (Developer Mode Configuration)
  • gameplay (Gameplay Configuration)
  • graphics (Graphics Configuration)
  • language (Language Configuration)
  • modding (Modding Configuration)
  • oni (Original Oni Options Configuration)
  • windows (OS Interaction Options)

For names of all entries, and a brief help, see the "All Configuration Settings" section below for more information.

Command-line arguments

Command line options are still present in the beta Daodan although the syntax is a little different (and a bit more powerful.) The basic syntax for a command line option is this:

-<ini section>.<name> <value>

Where <ini section> is the Daodan.ini section (usually Patch or Options,) <name> is the option and <value> is the value to set it to (usually True or False.) Therefore, to disable sound, start Oni with this:

oni -options.sound false

When <ini section> is omitted, it is assumed to be options. When <value> is omitted, it is assumed to be true unless <name> starts with no (eg. nosound) in which case it is assumed to be false. So an easier way to write the above command would be:

oni -nosound

Options or patches specified on the command line take precedence over options specified in Daodan.ini. Currently Oni's command line parser isn't powerful enough to parse language elements (no support for quoting arguments); this will be fixed in a later release.

All Configuration Settings

Below are the names of the configuration settings you can turn on and off in Daodan.ini (names and sections are case-insensitive). Also noted is whether the DLL has this patch turned on or off by default.

INI Section INI Name Default Description
[devmode] highres_console true Fixes bug where console line becomes invisible at higher resolutions.
[devmode] showtriggervolumes true Allows BSL variable "show_triggervolumes" and Ctrl+Shift+X (in devmode) to work.
[gameplay] bindablecheats true Enables cheats to be bound to keys using key_config.txt. Requires "customactions" and "cheattable" to be on.
[gameplay] characterawareness true Prevents AIs from forgetting about you when they are pursuing you and lose sight of you.
[gameplay] cheatsenabled true Enables cheats without having to beat the game first. Required for using 'tellmetheversion'.
[gameplay] cheattable true Replaces Oni's cheat table with table that includes new cheats (see section below). Required for using 'tellmetheversion'.
[gameplay] cooldowntimer true Disables weapon cooldown exploit, e.g. dropping the Mercury Bow and picking it back up right away to reset weapon cooldown.
[gameplay] customactions true Allows new bindable actions to be registered with the DLL, such as bindable cheats (if "bindablecheats" is on).
[gameplay] kickguns false EXPERIMENTAL! Unfinished, do not use.
[gameplay] pathfinding true Multiplies size of pathfinding grid cache by eight in order to prevent crashes in large levels.
[gameplay] projaware true Allows AI to dodge incoming gunfire properly.
[gameplay] throwtest false EXPERIMENTAL! Enables experimentation with allowing enemies to be thrown over railings.
[gameplay] wpfadetime true Adds working function for existing BSL command wp_fadetime, sets fade time to 4800.
[graphics] binkplay true Fixes binkplay calls to use GDI and outro same mode as intro.
[graphics] daodangl true Provides an improved windowed mode (-noswitch); this patch is known to break the hiding of the Windows taskbar in fullscreen mode.
[graphics] displayenum true Offers a more accurate list of available display modes in the Options menu.
[graphics] gamma true Enables gamma slider in fullscreen, disables it in windowed mode.
[graphics] newweap true Enables weapon info, so that standing above a weapon displays a message containing the weapon name and amount of ammo.
[graphics] optionsvisible true Enables always showing the options button in main menu, even when pausing from a game.
[graphics] showalllasersights false Enables visibility of all (also enemies') weapon lasersights
[graphics] widescreenportraits true Prevents fly-in portraits from being stretched when playing in widescreen resolutions.
[language] chinese true Allows Chinese fonts to be shown if the required DLL is available.
[language] fonttexturecache true Doubles size of font texture cache.
[language] language en Sets localization for hardcoded strings (e.g. "Savepoints").
[language] nomultibyte true Enables languages which use multibyte coding (such as Chinese).
[modding] argb8888 true Enables the use of textures using ARGB8888.
[modding] d_regen true Enables script command d_regen (query/set regeneration for any character).
[modding] daodanbsl true Adds new BSL commands (see below).
[modding] hdscreens_lowres true Allows HD intro/ending screens on game resolutions smaller than 1024x768.
[modding] largetextures true Enables the use of textures up to 512x512.
[modding] levelplugins true Allows level files that do not end in "_Final" to be loaded from the GDF.
[oni] debug false Not useful; probably does nothing.
[oni] debugfiles false Enables function logging; when active, BSL function calls are logged to script_debug.txt.
[oni] findsounds false Not useful, extends output of sound_list_broken_links.
[oni] ignore_private_data false Disables the loading of 'private data' in level0. Probably has no effect.
[oni] sound true Enables sound.
[oni] switch true Enables always switching screen to resolution on Oni's Options screen, making the game fullscreen; opposite of Oni's built-in argument "noswitch".
[windows] alttab true Allows user to switch applications while in Oni (Alt-Tab) and use the Windows key; however, it may enable the screensaver as well.
[windows] border true Adds a border in windowed mode if '[graphics] daodangl' is active.
[windows] clipcursor true Limits cursor to Oni's window.
[windows] directinput true Forces on DirectInput. Should be off for Linux/Wine.
[windows] disablecmdline true Disables Oni's existing command line parser as Daodan has its own.
[windows] killvtune false Prevents loading of vtuneapi.dll.
[windows] safeprintf true Replaces Oni's function that prints to startup.txt with a safer one.
[windows] topmost false Keeps game window on top in windowed mode, even when switching applications.
[windows] usegettickcount true Replaces Oni's timing functions with more accurate ones.

Added cheat codes

  • bigbadboss
Player takes less weapon damage.
  • buddha
Player is unkillable (will not go below 1HP).
  • bulletproof
Player takes no weapon damage.
  • kangaroo
Player can make super-high jumps.
  • marypoppins
Player can fly by holding down jump key.
  • shinobi
Extra difficulty mode; player always has 1HP, but also is immune to weapons, and the enemy AI cannot hear the player.

Added BSL functions

Any time a function can both get and set a value, and you set the value, the old value should be is returned, barring any programming oversight by Gumby.

Math

  • int int32mul n1:int n2:int
Multiplies two integers
  • float mul [int1:int|float1:float] [int2:int|float2:float]
Multiplies two numbers
  • int int32div n1:int n2:int
Divides two integers
  • float div [int1:int|float1:float] [int2:int|float2:float]
Divides two two numbers
  • int int32rand start:int end:int
Returns a pseudo-random number between two numbers (inclusive).

Characters

  • int d_getkills [ai_name:str | script_id:int]
Gets the number of kills a character has
  • int d_getdamage [ai_name:str | script_id:int]
Gets the amount of damage a character has caused
  • string d_name [ai_name:str | script_id:int] [newname:string]
Gets or sets a character's name
  • string d_regen [ai_name:str | script_id:int] on_off:bool
Gets or sets a character's regeneration (like elderrune for the player)
  • int d_getindex [ai_name:str]
Gets a character's script_id from their name
  • int d_powerup ai_name:str|script_id:int powerup:str [newcount:int]
Gets or sets the amount of powerups a character has
Powerup list the same as with chr_givepowerup with the addition of "bossshield"
  • int d_health [ai_name:str | script_id:int] [newhealth:int]
Gets or sets a character's health
  • int d_maxhealth [ai_name:str | script_id:int] [newmaxhealth:int]
Gets or sets a character's maxhealth
  • int d_holdkey [ai_name:string | script_id:int] keys frames:int
Makes a character hold a key
Possibly broken
  • int d_isheld keys
Checks if player is holding a key
Possibly broken
  • int d_waitforkey keys
Waits for a keypress from the player
  • int d_powerup [ai_name:string | script_id:int] powerup:string
Gets or sets a character's powerups
  • float d_location [ai_name:string | script_id:int] xyz:string
Gets the XYZ coordinate of a character
  • float d_location [ai_name:string | script_id:int] x:float y:float z:float
Sets the XYZ coordinates of a character
  • float d_distance [ai_name:string | script_id:int] [ai_name:string | script_id:int]
Gets the distance between two characters
  • int d_regen [ai_name:string | script_id:int] yesno:int
Gets or sets a character's regeneration abilities

Text

  • void d_dprint text:string [textcolor: r b g] [shadowcolor: r b g]
Prints to console in color
Colors are ints between 0 and 255. Other numbers will be reduced to 255.
Any colors you do not supply will be replaced with the default values: 255, 255, 255 and 63, 63. 63
  • string sprintf str1:format ...
Does a C-style sprintf operation on a string

FASM-Daodan (old)

Note: Unsupported by community. There is also a much older release of Daodan, referred to as FASM-Daodan. This is the original version by SFeLi. Unlike the C-Daodan, FASM-Daodan requires a different DLL to be downloaded depending on which Oni.exe is used. It does not support the newer Daodan features, such as windowed mode and custom resolutions, however it still contains the basic patches such as the Windows XP patch and the custom cheats.

Download a ZIP containing the DLLs for each version.

Download a ZIP containing the DLLs for an experimental (unstable) FASM-Daodan This includes the projectile awareness patch and support for any language (except Chinese and Japanese).