Daodan DLL: Difference between revisions

69 bytes removed ,  27 March 2024
m
corrected a section name that changed and added more SectionLinks for convenience
m (wikilinked Data Comlink)
m (corrected a section name that changed and added more SectionLinks for convenience)
 
(2 intermediate revisions by the same user not shown)
Line 30: Line 30:
*Custom screen resolutions – Includes many more possible screen resolutions.
*Custom screen resolutions – Includes many more possible screen resolutions.
*BGRA32 (ARGB8888) texture support.
*BGRA32 (ARGB8888) texture support.
*Extra cheats – See "Added cheat codes" section below.
*Extra cheats – See {{SectionLink||Added cheat codes}}.
*Cheats always enabled – No need to beat game first.
*Cheats always enabled – No need to beat game first.
*Extra command-line options (for advanced users) – For a list, type "Oni -help".
*Extra command-line options (for advanced users) – For a list, type "Oni -help".
Line 39: Line 39:


===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 adds some basic localization support by allowing cheat code names and two hardcoded strings in Oni to be translated.
The Daodan DLL offers support for the Chinese version of the game as well as multibyte languages in general (see "multibyte" under {{SectionLink||All configuration settings}}). It also adds some basic localization support by allowing cheat code names and two hardcoded strings in Oni to be translated.


To enable Chinese support, type:
To enable Chinese support, type:
Line 72: Line 72:
  [language]
  [language]
  language = xx
  language = xx
:You can call the locale whatever you want and it need not be an official ISO locale code such as "en" or "pt", but [[wp:List of ISO 639-1 codes|here's the list of language codes]] if you want it.
:You can call the locale whatever you want and it need not be an official ISO locale code such as "en" or "pt", but [[wp:List of ISO 639 language codes|here's the list of language codes]] if you want it.
:2. Create a folder alongside the Daodan DLL called "daodan_locales".
:2. Create a folder alongside the Daodan DLL called "daodan_locales".
:3. Create an INI file inside called xx.ini (or whatever you called your locale in step 1).
:3. Create an INI file inside called xx.ini (or whatever you called your locale in step 1).
Line 104: Line 104:
* windows ''(OS Interaction Options)''
* windows ''(OS Interaction Options)''


For information on all possible settings, see "All configuration settings" below.
For information on all possible settings, see {{SectionLink||All configuration settings}}.


===Command-line arguments===
===Command-line arguments===
Line 382: Line 382:


====Math====
====Math====
* int '''int32div''' n1:int n2:int
:Divides two integers
* int '''int32mul''' n1:int n2:int
* int '''int32mul''' n1:int n2:int
:Multiplies two integers
:Multiplies two integers
* float '''div''' [int1:int|float1:float] [int2:int|float2:float]
:Divides two two numbers
* float '''mul''' [int1:int|float1:float] [int2:int|float2:float]
* float '''mul''' [int1:int|float1:float] [int2:int|float2:float]
:Multiplies two numbers
: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
* int '''int32rand''' start:int end:int
:Returns a pseudo-random number between two numbers (inclusive).
:Returns a pseudo-random number between two numbers (inclusive).


====Characters====
====Characters====
* int '''d_getkills''' [ai_name:str | script_id:int]
* float '''d_distance''' [ai_name:string | script_id:int] [ai_name:string | script_id:int]
:Gets the number of kills a character has
:Gets the distance between two characters
* int '''d_getdamage''' [ai_name:str | script_id:int]
* int '''d_getdamage''' [ai_name:str | script_id:int]
:Gets the amount of damage a character has caused
: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]
* int '''d_getindex''' [ai_name:str]
:Gets a character's script_id from their name
:Gets a character's script_id from their name
* int '''d_powerup''' ai_name:str|script_id:int powerup:str [newcount:int]
* int '''d_getkills''' [ai_name:str | script_id:int]
:Gets or sets the amount of powerups a character has
:Gets the number of kills 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]
* int '''d_health''' [ai_name:str | script_id:int] [newhealth:int]
:Gets or sets a character's health
: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
* int '''d_holdkey''' [ai_name:string | script_id:int] keys frames:int
:Makes a character hold a key
:Makes a character hold a key
Line 417: Line 410:
:Checks if player is holding a key
:Checks if player is holding a key
:Possibly broken
:Possibly broken
* float '''d_location''' [ai_name:string | script_id:int] axis:string anything:string
:Gets the X, Y or Z coordinate of a character, as specified in "axis"; the "anything" parameter is unused but must be present
* float '''d_location''' [ai_name:string | script_id:int] x:float y:float z:float
:Sets the XYZ coordinates of a character
* int '''d_maxhealth''' [ai_name:str | script_id:int] [newmaxhealth:int]
:Gets or sets a character's maxhealth
* string '''d_name''' [ai_name:str | script_id:int] [newname:string]
:Gets or sets a character's 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 is the same one used with '''chr_givepowerup''', with the addition of "bossshield"
* int '''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_waitforkey''' keys
* int '''d_waitforkey''' keys
:Waits for a keypress from the player
: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====
====Text====
Line 435: Line 431:
:Colors are ints between 0 and 255. Other numbers will be reduced to 255.
: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
:Any colors you do not supply will be replaced with the default values: 255, 255, 255 and 63, 63. 63
* 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