Reldens - Documentation
Go to websiteCheck our demo!Source GitHub
  • Documentation
  • What is Reldens?
  • Admin Panel
  • System Configuration
  • Contents creation
  • Customize your game
  • Demo server setup - Amazon Linux (2024)
  • Generators and import
  • Installation
  • Known issues
  • How to create a new Room/Scene?
  • Maps Wizard
  • System requirements
  • assets
    • object-sprite
    • player-sprite
    • skill-sprite
  • entities
    • Class Path
    • Item
    • Level Modifiers
    • Level
    • Levels Set
    • Objects
    • Respawn Areas
    • Rooms
    • Skill Types
    • Skill
    • Stats
    • Target Options
  • general
    • Actions
    • Create and configure a player spritesheet
    • Events Manager
    • Operations
    • Plugins
    • Project structure
  • generators
    • Attributes per level generator
    • Enemies experience rewards per level
    • map-composite-file
    • maps-elements
    • Generate multiple maps by loader generator
    • Generate multiple maps with associations by loader generator
    • Generate a single map by elements composite loader
    • Generate a single map by elements object loader
    • Players experience per level generator
  • importers
    • Objects Importer
    • Skills Importer
  • packages
    • tile-map-generator
      • The "composite" approach
      • Tile Map Generator
      • The "objects" approach
Powered by GitBook
On this page
  • 1 - Prepare your assets
  • 2 - Generating class paths and players data through commands
  • 3 - Importing class paths data through commands
  • 4 - Generating and importing maps through the admin panel
  • 5 - Create and import objects with respawn areas
  • 6 - Create and import skills
  • Summary:

Contents creation

PreviousSystem ConfigurationNextCustomize your game

Last updated 3 months ago

Note: though is recommended to learn the info in the links below, you don't need to read all of them now to follow the content creation steps.

The contents are related between each other, so you need to create them in the following order:

Ways to create the game contents:

  • Through the available as commands.

  • Through the generators and imports available in the .

  • Manually creating each entity in the administration panel.

  • Directly with queries in the database using any client (not recommended).


1 - Prepare your assets

For the documentation we will create 2 classes: "Warrior" and "Mage".

You can create as many as you like, but at least 1 is required for the platform to work (even when later you don't show it anywhere in the game).

You need to place these files in the following folder: [your-game-folder]/theme/[your-theme]/assets/custom/sprites/

By doing that, the files will be included in your dist next time you build the game client through the buildClient command.

2 - Generating class paths and players data through commands

Here we will use the generators available on the commands to get as much data as possible to later process with the importers.

  • Then run the command to get the result:

$ npx reldens-generate players-experience-per-level ./generate-data/players-experience-per-level.json
  • Then copy the generated file and rename it to class-paths.json.

  • In that file (class-paths.json), we will include our classes paths information.

  • In the JSON example below we are including different "labels" for the paths at different levels (50 and 100), this will represent our class paths changes (with code you could customize the behavior to make the players change classes through an NPC).

  • Additionally, in the same file we will include another parameter called "preAppendRace" = true, which will be used by the importer later.

{
    "preAppendRace": true,
    "classPaths": {
        "Mage": {
            "50": "Wizard",
            "100": "Sage"
        },
        "Warrior": {
            "50": "Guardian",
            "100": "Warlord"
        }
   },
   "levelsSets": {
        "all": {
            "1": {
                "req": 10,
                "total": 10,
                "growthFactor": 2
            },
            "2": {
                "diff": 10,
                "req": 20,
                "total": 30,
                "growthFactor": 2.005
            },
            "3": {
                "diff": 20,
                "req": 40,
                "total": 70,
                "growthFactor": 2.01
            }
            // here you should put the generated levels data
        }
    }
}
  • Copy the generated file and rename it to stats.json.

  • In that file (stats.json), we will include our "stats" basic data for the importer, like this:

{
    "stats": {
        "hp": {
            "label": "HP",
            "description": "Player life points",
            "base_value": 20,
            "customData": "{\"showBase\":true}"
        },
        "mp": {
            "label": "MP",
            "description": "Player magic points",
            "base_value": 20,
            "customData": "{\"showBase\":true}"
        },
        "atk": {
            "label": "Atk",
            "description": "Player attack points",
            "base_value": 10,
            "customData": null
        },
        "def": {
            "label": "Def",
            "description": "Player defense points",
            "base_value": 10,
            "customData": null
        }
    },
    "statsByVariation": {
        "player": {
            "1": {
                "Mage": {
                    "hp": 123,
                    "mp": 176,
                    "atk": 39,
                    "def": 39
                },
                "Warrior": {
                    "hp": 176,
                    "mp": 106,
                    "atk": 62,
                    "def": 56
                }
            }
            // all the levels 
        }
    }
}
  • Here you can see we are adding custom data on the HP and MP "stats" to make these show their base value in the client. This will make the properties display like HP 23/30 (current value / base value) instead of HP 23 (current value only).

  • When running the import of this file it will generate the required "stats" and then the variations.


3 - Importing class paths data through commands

With the generated files (class-paths.json and stats.json) we have enough data to run the imports.

  • Open a console on your game root folder.

  • Reminder, for every command replace [your-theme-name] by your game theme name, in the examples is my-game.

  • Run the two imports in the following order

$ npx reldens-import class-paths [your-theme-name] generated/class-paths.json

$ npx reldens-import attributes-per-level [your-theme-name] generated/stats.json
  • At this point, by default the class paths generator should have created your classes by all disabled.

  • Start, your server, go to the admin panel > Classes & Levels > Class Paths > edit each, set the enabled = true, and save.

[Know bug v4.0.0-beta.38.3] - Fix the records directly in the database with a query like the following:

UPDATE `skills_class_path` SET `enabled` = 1;

After running the two imports, you should be able to start your server, register a player and reach the class path selection screen:


4 - Generating and importing maps through the admin panel

At this point you could:

The next step will be to change the default config to set your player initial class and map.

In the admin panel go to the configuration section and filter by the following paths:

  • players/initialState/room_id

  • players/actions/initialClassPathId

By default, these values are set as "1", but since you created two class paths, and multiple town maps here you need to set the IDs if any of those.

For example, if you like to have a mage as default class path, or if you like to start in town 4 instead of town 1.

With the maps generated you are able to get into your game already!

First thing you will note is: sub-generated maps will be automatically linked (like houses in town which were automatically generated with the town map), but there isn't any link between the town and the forest maps or between each forest.


5 - Create and import objects with respawn areas

For the objects creation and import we will use the "Objects Import" tool available in the administration panel under the "Wizards" item in the main menu.

Once you have it, you can upload it or copy/paste it and click on the "Generate" button.


6 - Create and import skills

For the skills creation and import we will use the "Skills Import" tool available in the administration panel under the "Wizards" item in the main menu.

Once you have it, you can upload it or copy/paste it and click on the "Generate" button.


Summary:

  • Prepare your configuration files for every generator and then go crazy:

npx reldens-generate players-experience-per-level ./generate-data/001-players-experience-per-level-2025-02-05-15-55-45.json

npx reldens-generate attributes-per-level ./generate-data/003-attributes-per-level-2025-02-05-15-46-07-players.json

npx reldens-generate attributes-per-level ./generate-data/004-attributes-per-level-2025-02-05-15-50-30-enemies.json
  • Update the files and complete the required data manually to get your "class paths" and "stats" ready for import:

npx reldens-import class-paths [your-theme-name] generated/class-paths.json

npx reldens-import attributes-per-level [your-theme-name] generated/stats.json
  • Prepare your objects and skills data files and import those through the administration panel.

  • Prepare your maps config files and go crazy again on the Maps Wizard in the administration panel.


Each class path will require their own :

Check the documentation for the to create your players experience configuration file: ./generate-data/players-experience-per-level.json.

Or use the .

Your final class-paths.json file should look like this :

Now, use the to create the "stats" with their incremental values per level for each of your classes or use this .

Your final stats.json file should look like this :

To get your game up and running at this point you need a .

The main requirement to create a RoomScene is the , which needs to follow all the name conventions and rules in order to work properly.

Use the app to .

Use in the admin panel which will generate and import the maps for you.

For these contents creation documentation we will use the , so follow the instructions in the link.

To fix that, we need to create change points and return points on each map manually, follow the instructions on .

If you click on the Set Sample Data in "Generator Data" button, you will get a JSON with the data to create two simple enemies, but here you can see a more complete example: .

Follow the to create a JSON for the objects you need.

If you click on the Set Sample Data in "Generator Data" button, you will get a JSON with the data to create two simple enemies, but here you can see a more complete example: .

Follow the to create a JSON for the skills you need.

With all the basic contents created you can .

Level Sets
Class Paths
Levels
Stats
Levels Modifiers
Rooms
Objects
Respawn Areas
Skills
generators and imports
administration panel
player spritesheets
mage.png
warrior.png
players experience generator
example file /examples/generated/players-experience-per-level-2024-12-04-13-57-21.json
/examples/generated/class-paths.json
attributes per level generator
example file /examples/generated/attributes-per-level-2024-12-06-19-03-48.json
/examples/generated/stats.json
RoomScene
map in JSON format
Tiled Map Editor
create the maps manually
"Maps Wizard"
Maps Wizard (maps-wizard.md)
objects.json
"Objects Importer" guide in this link
skills.json
"Skills Importer" guide in this link
move forward on the customizations section
this link to create new "change points" and "return points"
Reldens - Player creation screen without scene
Reldens - Player creation screen with scene
Reldens - Game up and running!
Reldens - Objects Import
Reldens - Skills Import