Daodan DLL: Difference between revisions

404 bytes removed ,  11 July 2014
→‎Settings: Rewrote for v3.7, and removed irrelevant sections. Language will be re-added in a separate section
(→‎Settings: Rewrote for v3.7, and removed irrelevant sections. Language will be re-added in a separate section)
Line 38: Line 38:
The DLL enables [[Developer Mode]]; go to the pause screen (F1) and type "thedayismine" or simply 'x' to activate it.
The DLL enables [[Developer Mode]]; go to the pause screen (F1) and type "thedayismine" or simply 'x' to activate it.


===Settings===
===Configuration===
====Patches====
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.
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 temporarily disable a setting in the INI, add a '#' to the beginning of the line and the Daodan will ignore it.


To enable a patch, look for the patches section in your Daodan.ini. If the patches section doesn't exist, create it by typing
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.'''
[Patch]
 
at the end of your file.
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.
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]
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
  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====
Daodan.ini may contain the following sections (names are case-insensitive):
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
* devmode ''(Developer Mode Configuration)''
[Language]
* gameplay ''(Gameplay Configuration)''
To enable Chinese support, type:
* graphics ''(Graphics Configuration)''
[Language]
* language ''(Language Configuration)''
Chinese = True
* modding ''(Modding Configuration)''
This will load a DLL called xfhsm_oni.dll (apparently provided with Chinese copies of Oni).
* oni ''(Original Oni Options Configuration)''
* windows ''(OS Interaction Options)''


Here are the strings that you can replace using the .ini file:
For names of all entries, and a brief help, see the "All Configuration Settings" section below for more information.
{| class="wikitable"
!INI name
!Description
|-
|blam
|Replaces body text of the [[:File:Blam!.png|blam window]].
|-
|damn
|Replaces title of the [[:File:Blam!.png|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!".
|}


===Command-line arguments===
===Command-line arguments===
6

edits