ddon-server/Arrowgene.Ddon.Scripts/scripts
2026-07-10 18:44:01 -04:00
..
addendums feat: Implement the EXM "Recurrence of Darkness" 2025-02-26 10:28:00 -05:00
area_rank/monster_caution_spots Caution spot updates 2026-07-08 17:02:24 +01:00
chat_commands Feedback Changes round 2 2026-07-10 17:14:01 -04:00
custom Networking 2.x (#982) 2026-03-17 09:29:37 +08:00
emblems/stats feat: Job Emblems 2025-05-23 23:00:13 -04:00
enemies feat: Area/Dungeon Boss AP reward 2025-07-05 10:36:47 -04:00
extended_facilities Check 238 2026-06-20 19:19:38 +01:00
game_items refactor: Change #load root in scripts 2025-02-26 15:35:52 -05:00
job_orb_tree fix: Fix issues found in 3.1 tree 2025-07-23 08:39:21 -04:00
libs Fix: Bugfix Stack 08-21 ~ 09-02 (#958) 2025-09-17 02:17:30 -07:00
mixins feat: Official Pawns 2026-05-31 08:31:27 -04:00
official_pawns offical pawn updates 2026-06-06 14:18:24 -04:00
point_modifiers fixes: Fix issues reported 2025-04-24 23:51:48 -04:00
quests Prince Nedo MSQ bugfix 2026-07-10 15:26:41 +01:00
scheduled_tasks feat: Improve quest rewards 2026-05-03 22:02:46 -04:00
settings feat: Official Pawns 2026-05-31 08:31:27 -04:00
libs.csx feat: Scriptable tasks 2026-04-25 09:21:49 -04:00
README.md Networking 2.x (#982) 2026-03-17 09:29:37 +08:00

DDON Scripting

The DDON scripting is intended to expose certain server internal details of the game server that a server admin wish to be configure. While initially implemented as JSON file, as more complex features come into the picture, a more complex configuration archirecture is required.

The scripting root is scripts directory inside the assets directory. Internally the functions which perform reverse lookups for modules will terminate once reaching the root.

Each directory inside scripts defines the scripting module. A module name should be all lowercase. Inside each module, there should be a README.md file which describes the purpose and usage of the module. It should also describe any guidelines required. When implementing a module, be aware if you want the module to be hotloadable. If you do, make sure to program in such a way that the settings can reflect as such after an update.

Note

To improve startup times, scripts will be cached and restored from their pre-compiled DLLs if the source has not changed since they were last loaded. To prevent this, declare a variable named PREVENT_SCRIPT_CACHE (of any type and value). You can reset the cache and force recompilation for all scripts by deleting Files\script_assemblies\hashes.csv.

Setting up code completion

Next section describes how to configure code completion for your scripts.

vscode

  • Install the Microsoft C# extension
    • You don't need the C# Dev Kit extension by Microsoft.

In your settings, add the following configs

"csharp.maxProjectFileCountForDiagnosticAnalysis": -1,
"dotnet.server.useOmnisharp": false

To get code completions in the file, you need to update the libs.csx file in your output directory. Uncomment the two #r directives at the top of the file and update the path for your local build.

// [!NOTE]
// To get syntax completion in vscode, uncomment the #r lines below and
// update "path\to" to be the path to the builds output directory.
//
#r "path\to\Arrowgene.DragonsDogmaOnline\Arrowgene.Ddon.Cli\bin\Debug\net10.0\Arrowgene.Ddon.Shared.dll"
#r "path\to\Arrowgene.DragonsDogmaOnline\Arrowgene.Ddon.Cli\bin\Debug\net10.0\Arrowgene.Ddon.GameServer.dll"

When implementing a script, if it doesn't exist, add a #load directive for the file libs.csx at the top.

To enable auto completion, the path required for vscode unfortunately requires the absolute path so the editor can locate the file.

Warning

Don't commit the file with the absolute path. The server code is able to resolve #load "libs.csx" correctly.

/**
 * @brief Recurrence of Darkness
 */

#load "path\to\Arrowgene.DragonsDogmaOnline\Arrowgene.Ddon.Cli\bin\Debug\net10.0\Files\Assets\scripts\libs.csx"

public class ScriptedQuest : IQuest
{
    // Implementation ...
}

Note

Some day, the built in Microsoft.CodeAnalysis.LanguageServer will have the ability to pass the assembly references to it and these instructions should be updated when that happens.

Note

When you update an assembly, if the symbol doesn't show up type > .NET: Restart Language Server