makeopensource / Classic-RPG

A classic role-playing game with an engine.
GNU General Public License v3.0
7 stars 19 forks source link

Improve .dl file layout #91

Closed emilkovacev closed 1 year ago

emilkovacev commented 1 year ago

Is your feature request related to a problem? Please describe.

The .dl file layout works well for small datasets, but with larger datasets with lots of text and many parameters, it begins to fall apart.

Describe the solution you'd like

A new .dl filetype should be developed. The current parser should be moved to a new file, and expanded to include the following:

version: 2.1
---
1 | Castle
node_type: location
text-interaction: You run from the dragon.

2 | Health Potion
node_type: potion
text-interaction: You take the health potion
health: +25
xp: +100
coins: -5

3 | Dungeon
node_type: Location
text-interaction: You take the health potion
health: +0
xp: +0
coins: +100
---
1 -> 2
2 -> 3
1 \-> 3
WeirdAlex03 commented 1 year ago

I imagine we'll probably be updating the file layout rather frequently this early in development. I think it would be better to have the file version in two parts, as in 0.2. This would follow the standard major.minor pattern, with all pre-release changes as 0.x. The 3-part version number, major.minor.bugfix is also an option, but I don't think we'll need the third class for the file type. Maybe for the parser, but not for the file itself.

emilkovacev commented 1 year ago

Good point! I'll revise the file format to match your suggestion

emilkovacev commented 1 year ago

I would also like to add parser specifications: