Skip to content

CLI for Dokedex — a customizable game design system that syncs markdown-based game data (like items, characters, or quests) directly with Godot's resource system.

Notifications You must be signed in to change notification settings

Hasenn/dokedex-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DokeDex

DokeDex is a Rust-powered tool to manage game resources for Godot using Markdown files with YAML frontmatter, and custom parsers and parser-generating for defining trees of resources. It works with the Godot Doke plugin to generate .doke resource files for Godot projects that enable a Wiki to be used .


Prerequisites

Before using DokeDex, make sure you have:

  • Rust installed and available in your terminal.
  • Git installed and accessible from the command line.

Setup

  1. Add the Godot Doke plugin to your Godot project.
  2. Install dokedex-cli
  3. From the root of your project, run:
dokedex new

Getting Started

install rust https://www.rust-lang.org/tools/install make sure you have git installed and accessible from the cli

add the godot-doke pluggin to your project and (optional) install dokedex

use dokedex new from your project's root. That will create a new Dokedex folder in ://res

You can also copy the dokedex-template from [Github](link to be added later)

Your Dokedex folder then normally looks like this :

Dokedex/
- .obsidian 
- .dokeconfig
- .doke/
  - doke-parser/
    (A rust project you should NOT edit but will nned to build to compile custom parsers)

Example : Making an Item resource type for your game

Step 1 : Making the resource script

Let's start by making an ItemResource.gd script in godot.

class_name ItemResource extends DokeResource

@export var price : int = 20
@export var flavor_text : String

If you just need to receive some data from Doke, this is all the code needed. We will see later how to define more complex resources.

Step 2 : Making an Item in your dokédex

Now, you can make a folder in DokeDex called Items to define your items in.

Let's make a Big Sword.md file in that folder and use a Yaml Frontmatter to set the price and the flavor text. In Obsidian you can just make a new note in the Items folder and type --- for a gui.

---
ID: 6515
Price : 250
Flavor text : "This is a very big sword. Wow !"
---

A big sword that can be obtained while defeating the big bad boss at the end of the game.

*You can use any convention here : Price, price, flavor_text, FlavorText are all valid and will be map to your flavor_text variable in Godot

Note that we added an ID to the Item. This ensures our Item can be renamed without issue and is useful in many ways. DokeResources all have an exported id Variant.

Step 3 : Importing the Dokédex's Items

You can now run dokedex export item --path res://data/items

This will find or make an items folder, and populate it with a big_sword.doke file that would look like this if you opened it with a text editor

---
doke_path : "res://Dokedex/Big Sword.md"
doke_id : 3651351353121
# Other things
---

doke_path points to your Big Sword.md file, and doke_id is used to track the file through renames by keeping its ID.

Godot-doke will then use an Import Script to import the .doke file as an Item Resource, and you will have a folder of items !

About

CLI for Dokedex — a customizable game design system that syncs markdown-based game data (like items, characters, or quests) directly with Godot's resource system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages