Diversion Network
Documentation

Contents

  • Main
  • Rules
  • Hub
  • Game Clusters
  • Parties and Friends
  • Playing Games
  • Minigames

  • CaptureTheFlag
  • MonumentRush
  • KingOfTheHill
  • Quake
  • BridgeWars
  • Skywars
  • TeamDeathMatch
  • Arcade*/?>

    Cloud Skyblock

  • Cloud Basics
  • Development Resources

  • Map Development Guide
  • Map Configuration Guide
  • DND Configuration Guide*/?>

  • Privacy Policy
  • Diversion Network Data (DND) Configuration Guide

    DNData is a config type written by Kirill Semyonkin.

    DNData was designed to be lightweight, easy to understand, simple to use and readable.

    Use DNDBin to share and parse DNData files.


    Contents


    Basics

    DND uses a key & value method of storing data. Keys and values are separated by a space or a dot. In this example the key is "key" and the value that it returns is "value".

    key value

    In DND indentation does not matter. These two are seen as exactly the same by the interpreter.

    key value key value

    DND automatically removes spaces and tabs from the start and end of the line. If you need a spaces at the end of a line then you can use %nbsp%

    key value %nbsp%

    The result will include all the spaces before %nbsp% plus one.


    DND Keys are case sensitive. The following is two different keys, one "key", the other "KEY"

    key value KEY value

    If there are multiple keys with the same name DND will use the first one. The rest will be ignored.


    Data Types

    DND allows you to store many types of data.


    Lists

    DND lists allow storing multiple items of any of the above types under one key. Lists are formed as follows.

    listkey[ List Item 1 List Item 2 List Item 3 ]

    Lists are marked by ending the key with a "[" bracket and ending them with a "]" bracket on a new line.

    Lists inside lists are not permitted.


    Levels

    Levels are a way to seperate data in DND. Levels are formed as follows.

    level1 key value level2 key value > >

    Indentation of levels is recommended for readability however is not required.

    Levels inside levels are permitted.

    Level names can not have spaces.

    Level names are case sensitive.


    Comments

    Sometimes referred to as Garbage Data, DND does not include a specific way to add comments. Instead simply adding a value with a key which is not used will make it act as a comment.

    # this is a comment # this is also a comment key this is also a comment

    Comments do not work in lists and will be treated as a list item.


    Panic

    DND Panic is what happens when a formatting error occurs. If the code can not find a value then it will try and set it, this may cause lots of extra spam into your DND. To prevent this always use DNDBin to parse your DND.


    Backups

    DND has a backup chain system. Every DND file can have a chain of backups. Backup files are used in the case of the file not having a value. If both the main and the backup have a value it will always use the main.


    Roses

    Preprocessing functions are actions performed before file is loaded. They are not present when DND is loaded. They usually feature @ character, plus some other. For safety reasons, those are disabled if DND is set to autosave.


    Rose Line Joiners

    Sometimes you need your dnd file to look more readable. More often it involves splitting a line into multiple. Rose Line Joiner is made to solve that issue. Put @> at start of a line and it will be added to previous one. Here is how it works:

    firstline @>secondline Result after load: firstlinesecondline

    When the interpreter runs it joins the two lines separated by the rose line joiner into one. Anything before the rose line joiner will be erased.

    firstline ignored [email protected]>secondline Result after load: firstlinesecondline

    Rose Functions

    Rose Functions are the type of functions that allow you to shorten your DND or do some kind of maths. To call a function, write @{name^arg1^arg2^...}. It will be replaced by appropriate kind of data on file load. Rose functions are executed after Rose Line Joiner. Unknown functions are replaced by word “error”. Functions are unknown even if function of same name exists if args length is unsupported (for example @{len^string} requires 1 arg, more or less is not accepted). Working on a rose level requires extra caution, because it is removed on load, which can remove everything after it in case of bad formatting as well.