RPG in a Box

RPG in a Box

Zbyt mało ocen
RPG in a Box - General Engine-Guide
Autorstwa: callme-jk
General Guide for RPG in a Box. - More Tutorials: on my website![selected-ejected.blogspot.com] :)

► ╢ ♥ Become Follower ♥ ╟ ◄
3
2
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
RPG in a Box - Quick-Links
Website & Discord[www.rpginabox.com] || Twitter || YouTube || Offical Doc[www.rpginabox.com]
[Info] Guide-Version & Update-Log
Guide-Version: 2.8
Little hint: Use Control / Strg + F to open searchbox in Steam / Browser. :)

Latest Updates: (new->old)

  • Added: [Script Editor] Arrays for more values

Added new section: (coming soon)
  • [soon] Combat Editor Section

Archiv
  • Added: [Map Editor] Switch textures of an entity-group (replaced dated section)
  • RPG in a Box - Quick-Links - Trello Links removed (no longer supported)
  • Added new external guide for Tools - Edit game.exe icon & file details
  • [Map Editor] Spawn & limit NPC´s on an area (renamed section & added npc's spawn-info)
  • [General] Engine Keybindings - Added hint for keybinding-bug & workaround

  • [General] Game-Path & Resolution reset section added
  • [NPC Range Combat] section added
  • [Item Editor] Items we need... -> Updated (item price read/write over script)
  • [General] Smoother Development -> Updated (map loading widget, free fly cam "noclip")
  • [UI Editor] Interface into the matrix -> Updated (button default colors, scripting)

[Links] Lets create games, now... 8)
And now, create the next voxel-hit... - its time for good games, again. ;)
Lets create a first guide here... - Nice engine and no guides, yet... ?
Lets change this... :) - Thanks for reading and happy creating... - jk


RPG in a Box Engine-Links:

Website & Discord can be found on:
https://www.rpginabox.com

Offical Docs:
https://www.rpginabox.com/docs/doku.php?id=welcome

Twitter:
https://twitter.com/rpginabox

YouTube:
RPG in a Box Offical YouTube Channel


Other Links:

Voxel Tools (Import into the engine is possible)

Magica Voxel - Website: https://ephtracy.github.io
A free lightweight 8-bit voxel art editor and GPU based interactive path tracing renderer.

Goxel - Website: https://goxel.xyz/
Another Voxel-Editor with support of: mirror, copy/paste, layers and other features.

Inspiration & Tutorials

Pixel (Voxel) Game-Art Tutorials: https://blog.studiominiboss.com/pixelart

Voxelmade: https://www.voxelmade.com/magicavoxel/
A Website for inspiration.

Steam Store: Voxel-Tag: https://store.steampowered.com/tags/de/Voxel/

Google-Search for inspiration / import into the engine: magicavoxel[www.google.com]

Bring your game to Steam

Steamworks

Indie Platforms
(Both platforms have a software-client to update game-files.)

http://itch.io
Guide for itch.io : Publish Guide[itch.io]

https://gamejolt.com


RPG in a Box - Games

Showcase Submission on RPG in a Box Website[forms.gle]

Current Showcase on product website: https://www.rpginabox.com/games

First steps... to become Will Wright... :)
Lets jump in... to become the next GameDesigner Legend... :)

Its a good idea to start with the tutorials on the offical Docs Site. Fast you will arrive somewhere more skilled then in minute one. :) And in 2-3 days you can make already your game... - Yeah, its so easy. :)

Start here: https://www.rpginabox.com/docs/doku.php?id=tutorials

[General] Game-Path & Resolution reset
The Game-Path can be found here:

C:\Users\YOUR WINDOWS USER NAME\AppData\Roaming\YOUR GAME/PROJECT NAME

There you can find the save-files of the game and the settings.cfg where you can reset the screen-resolution in case you got stuck with it in the Quickplay-mode and lost visible menu on screen to setup this again. In example back to:

[display]

fullscreen=false
window_size="1280x720"

[General] Engine Keybindings
General

Info: There is a keybinding-bug. In case you are not using US language in Windows it could create problems! - In example: With german language the keybindings for Voxel Editor (frame navigation and moving) don't will work! - Install US language in Windows Settings and switch before you start the engine with Windows-Key + Space to english and it works! Now you can even close Editor-tabs with Control (Strg) + W like in the browsers. :)

Control / Strg + A == Select all text
Control / Strg + C == Copy selected text
Control / Strg + V == Paste text from Clipboard

Mouse Wheel up / down == Scrolling in Dropdown Fields
(with alot of objects in the project, these fields can become larger then the screen with scrolling you can make all objects visible, again. Just place the mouse in the field and use the wheel.)

F11 == Fullscreen on/off
(in case there is no Fullscreen-Exit Button this helps) :)

Alt + F4 == Close Window (eg. for game-testing window)

Voxel Editor

1 & F1 == Add Voxels
2 & F2 == Paint Voxels
3 & F3 == Erase Voxels
4 & F4 == Replace Color
5 & F5 == Move Voxels
6 & F6 == Select Voxels
7 & F7 == Pick Color

ALT GR == Pick Color
Control / Strg + A == Select all Voxels

Frame-Navigation

Control / Strg + Cursor-Keys == Frame Navigation

Tool-Mode (depends on current editor-mode^^)

F == Face-Mode
B == Block-Mode
V == Voxel-Mode

Map Editor

F == Jump Back into the center of the map (0-0-0) & use normal cam mode
(press F again for free cam mode again in center of the map)

Escape == De-Select Entity
Del (over Path-Point) == Delete all paths on this tile
(hold Del and move the mouse over the Path-Points for quick-delete more)

N == Switch Path-Type selection

Control / Strg == Grab Height-Value without taking tile
Alt GR == Grab Height-Value and take a copy of the tile
Shift + MouseWheel == One Voxel-Value up/down for placing
Control / Strg + MouseWheel == One Map-Voxel-Size up/down (eg: 16 / 32 voxels)

Dialog Editor & Display Message Window:

\n in the textfield == Linebreak in Display Message Window

Game Configuration - Keybindings

Info: Different Keyboard-Layouts (QUERTY/ZERTY,etc) can show currently wrong Keybindings on special chars, like: ? [ / etc. Not sure, what the engine use here. (Engine-Setup and/or Windows-Setup, etc. I use in example german & english language in Windows 10 with a german keyboard-layout and QERTZ-engine-setup and have wrong key-infos for these chars in the keybinding-list.)

Some default-keybindings can't be changed / used for own keybindings in your game, these are reserved for engine features, in example:

Escape = Close, eg. Main menu
W A S D = Movement
M = Minimap
I = Inventory
C = Climb Feature

[General] Game Details & Configuration
Game Details
Save-Path Destination: Use Windows Run-Dialog: %APPDATA%\<Game Title>
to open the savegame-folder. ( C:\Users\Windows-Account-Name\AppData\Roaming\Gametitle )

Game Configuration

Set here, general project settings for your game.

[General] Game-Manager & Import-Feature
Game-Manager

The Remove-Button just delete the entry in the list and not the project-folder on your harddrive. Dont worry about deleting an entry of this list. You can still open it again from the harddrive and the entry is back in the list. Last Update add an Info-Popup for this to confirm the delete process from the list.

Lets import some external stuff

The Import-Button can be found in the Voxel-Editor and can be used after creating a new object. Maybe it works too, if you drag the files into the Engine-Window directly. (in example in the Explorer-Area) You can put files into the project-folder with Windows Explorer, too. After this, press the Refresh-Button in the Game-Explorer of RPG in a Box, to see new files in the Engine.

[General] Tags,Thumbs & Color-Grouping
Use Tags and Thumbs for faster workflow...

Use Object-Tags for fast filtering

When you create objects for your game, give it a nice tag (or more). With this, you can filter these objects for faster access and a better workflow. Makes more fun, when it comes to creating the map and have an good overview. - Use Save as, to use the current tags in new object, too.

Tags-Example in the textbox:

nature
planet
earth
tree

Each line is a tag, that can be selected. In the right panel for: tiles, objects, chars. These tags can be used in Scripts, too. In example: You can use this Energy Core Item only in case the playerchar is a robot. (charobject with tag: robot). Look [Script Editor] General Script Details, how you can use this.


Make Object-Thumbs with a good angle

For a good fast overview create nice thumbs for your objects. Save the object first and create now your thumb. (save can delete the thumb) With this order no need to re-create this.

Use the four arrow-button below on the right side to set a nice camera-angle for a flat 2D-pic in case you prefer this. Or use a 3D-pic as a thumb. I prefer both, but I think 2D comes with a better overview. After using the button just 2-3x the mouse-wheel little, position-move and we can create fast a nice pic. Click now on the button above the editor-view window. And done. :)

Group Object-Thumbs with background-color

Another nice way to group things, beside with tags... Use another background-color for the thumb-pics. Look Editor-Settings to change Thumb-Background.

[General] Select a Game Cam-Mode
What Cam-Mode will you use?

The engine comes with support of different Cam-Modes. You can edit this in the Game-Configuration area, inside of the Game Explorer Panel. (left side, where the folders are placed)

Game Explorer -> Game Configuration -> Gameplay
and there change Preset to Custom to change below the camera setting you want.


Cam-Modes:

Try different styles and decide which Cam-Mode fits best to your game.... :)

- GTA 1-2 TopDown Cam-Mode: Use Free-Cam and 89 degree for the cam.
- Iso-Cam mode need a more open map for walking-tiles. Only 1-2 walking-tiles can make problems, because the cam is watching on the wall and cant see the path...

Info: Currently I think we can use only one mode in the game... Not First- and Third-person cam with switch-feature, together! - Maybe something for future Engine-updates?

But we can create a map-overwrite for the cam-setup. (eg in one map First-Person cam, in others Third-Person cam. But it can creates some problems, in case we create in free cam-mode, a cam-position call with scripts, for iso-cam... No clue about cam-degree with different setups, in example use a top-down cam and mix this with other cam-overrides... Try this by yourself. :))

First Person or Third-Person or Iso-Look... ??? -> Thx me later after you decide for a re-design of your game, because now you want that other Cam-Mode... hihihi ;P (Time to put my evil-side back into the box) :)

[General] Smoother Development
Lets make things smoothey...., hmmm kkk ? 8)

General things

- I prefer to use inactive option for walkable tiles (create maps with better performance and dont creates other problems with re-creating the map, because of nav-bugs)

- Create path-lines by hand in the Map Editor.
- Dont use path-lines an walls... (thx me later ;P)

- Use object-tags, good script-names, less color-range in voxels.

- Learn first keybindings... and check the "Did you know...?" part.

- Use the documentation (at least, sometimes xD) in first place. :)
- Dont ignore the aspect to make a backup... (!) - Look guide, below.
- We are on Discord (!) ;) and dont be shy to ask in case you need help.
- Report bugs/issues (unknown things cant be fixed!) & maybe help others...
- Create a Tutorial/Guide, for yourself (!) and others...(can help to learn alot !)

- Show your work on (Discord) & on the (more visible!) Steam Product-Community-Hub (*)
(gives you always more back then the fear: "someone steal my work"... / pushes you forward to show sometimes things... and again and again... ;) - its like a good race, the runner in front of you pushes you harder forward.... - its a good feeling / progess.)

(*) His success... is our success... & our success is his success ! - This game was made by: RPG in a Box... - Did you knew it?!... - (I call this the circle of success)

And, btw.... more peepz in the community.... a higher chance to have active peepz who share stuff, help others, more ideas and help from others, etc... pp... (good for yourself at the end !)

- Trello & Discord are the #1 places to go, for (new/all) development details ;)
- Watch sometimes on RPG in a Box on Twitter...

Simple things for better Game-Testing

- Open (game config: ingame console active!) ingame-console and enter: noclip
to use free fly cam mode for map-check or screenshot / video PR-production. Use this again to disable this mode again.


Jump into the Map

There is no need for long timewaste-walkways from startposition, to test a map/location, just use this:

- Create a teleport-widget with load map - buttons to enter the map directly and
- Create a keybinding to open this widget

- Create a little map with different Map-Load options (Corridor of Matrix with the doors)
- Create behind these doors testing-maps only... (not part of your game later!)

or

- Create the startup script and create a comment-box below the Load Map Window.
In this add the data of Player Position.

Looks like: Name of the Cordination to copy/paste into the Load Map Window: coord[-2, -2, -1] With this, there is no need to jump into the map all the time and get the cord-positions... ;)

Disable Game-Menu in Game Configuration -> User Interface

There is no need to have this active during testing all the time.

Disable Sounds for testing

You want no Menu-Sounds or Fight-Sounds? - Go to: Windows-Soundmixer and disable it for the testing-window. :)

[Voxel Editor] General Things
General Voxel Editor Things

Model Properties
Info: For Default Behavior Option look Map Editor Section.

Char-Walking-Speed:
There are two (different) values for this. One is the Speed option and the other is the Movement option.

The Speed value (Char Movement-Speed in voxels over tiles)
comes in place for the walking-speed of the char, based on Voxels per seconds. In example: We use a 16*16 Voxel-Tile size, a value of 32 looks little bit faster then a value of 16. Its still moving tile by tile... Its more a value for how fast/smooth this is looking. A value of 8 or less and yeah, try it out... :)

The Movement value (Round Base Combat)
comes in place on Turn-Based Tactical-Combat and influence the Tiles per round that a char can be move. In case you use Real-Time Combat you can ignore this on value 1. For Turnbased-Combat I think its a good value with 1-3 Tiles, currently.

[Voxel Editor] Animations
Frame-Navigation with the Frame-Slider
You can use the buttons for Frame-Navigation or press into the Frame-Number area to open the Frame-Slider.

Use pre-defined animation names
Info: Add Animation -> after Namebox there is a little button for fast animation-name selection you can use in the engine, look for details below.

Reverse-Mode for Animations
Btw, you can use animations playing in reverse-mode, too. Use them from pic 3 to 1, in example, to play the open animation in reverse-mode for a close-animation. - There is no need, to create an open animation and a close-animation in one object with double animation-frames.

Look Doc-Informations:
https://www.rpginabox.com/docs/doku.php?id=predefined_animation_names
https://www.rpginabox.com/docs/doku.php?id=animation_types

Start-/End-Pics based on char Justin of the Engine Demo-Game:

default
Plays by default. (Tiles, Objects, Chars)


Char-Object only:

idle
frames: 1-2 - Animation-Speed: 4 default - Frame Length Multiplier: 8-12 (Pic1)

(other setup: speed lower then 4 eg ~ 1.5 - Frame Length Multiplier: 1 (all Pics))

Plays whenever the character is standing still and no other animations are active. The animation type for this would typically be “Loop” or “Ping Pong”.

walk
frames: 3-5 - Animation-Speed: 4 default - Frame Length Multiplier: 1

Plays whenever the character is moving from one tile to another. The animation type for this would typically be “Loop” or “Ping Pong”.

interact
frames: 6-10

Plays whenever the character interacts with an object. (Auto-Start with Chars-Animations only! It dont works on Objects with auto-start in case the char use this Object... - Keep this in mind! Use: play animation function to run the animation on the object.)

attack
frames: 6-10

Plays whenever the character executes an attack during combat. The animation type for this would typically be “Once” or “Ping Pong Once”.

death
frames: 11-15

Plays whenever the character is killed/destroyed during combat or other hazardous situations.

[Voxel Editor] Attach Points
Attach Points - a big game changer... (WIP)

Info:
With the Attach Point feature you can attach/dettach other objects into another object. It offers the option for a much faster workflow in animations. Beside alot of other options in general, like rotation/moving of objects without the need to move a single voxel around. It looks better..., in example for doors-open/close animations. Bind different items on chars its here just the basic-feature... - The feature offers so much more, like the usage with a visible storage feature and much more. - If you ask me, the invention of the wheel is nothing against this. ;)

General Details:

Attach Point: Default Scale Factor: 1.05

For a better understanding, because the Script Attach-Function NodeWindow-Design looks little bit confusing:

Object Attach Point ID = Attach Point of child object (eg, sword) (object model)
Entity Attach Point ID = Attach Point of parent object (eg, chars hand) (Target Entity)

The fields fits together like A1 - B1 || A2 - B2

[Voxel Editor] Portaits & Item Icons
Lets create 2D-Pics for Dialogs and Items

Create Portraits for Dialogs:

In the Voxel Editor you can find a button to create a Portait of your char for the Dialog-Editor.

Export Item-Pics to PNG:

Export from the Voxel Editor to file-format: .png for Item-Pics. Use size of the Voxel-Box: in example width: 16 height: 16 Voxelbox = same size for the png. Same for 32*32 pixel result in PNG.

Another nice way to create / replace (placeholder) icon-pics:

Go into Preview Game Mesh Mode of the Voxel Editor, use your Mouse-Wheel for a nice zoom-level and create a Screenshot, maybe with a nice angle(i.e. with Bandicam) and create your pic/icon with the free grafic-tool Gimp. Maybe add some nice effects with Gimp, like a glow-background upgrade. :) With this way you can create an icon not only from the front-view, too.

[Voxel Editor] Generate Texture...
No need to paint all this by hand - Use Noise Generator

In case you missed it, there is a button in the menu, where you can use the Noise Generator to create the texture for your ground-voxels. Use this tool for a nice color-mix, too. This helps alot, in case you want a small color-range and a less ugly look with colors. xD - Time to save some colors!

Its currently only working with a ground-voxellayer, which will be created on ground. Not on selected Voxels. Maybe we have this in the future. :) - But you can move it with the arrow-button one up and generate in the Noise Editor a new ground-layer...., or use the copy/paste feature and select and rotate the new voxel-layer... The first way works a little bit faster here.

[Map Editor] Create our world
Lets create our world with the Map Editor

Offical Doc: https://www.rpginabox.com/docs/doku.php?id=map_editor

Warning: Delete an used object (tiles/object/chars) from the right engine-panel..., in case its used in a map... (!) very bad idea... can kill the map, currently. After that, the map cant be opened anymore in the engine. Better dont delete anything... - Fast way to lose alot of work.

Info: You can create a map way more faster, with placing: tiles, objects, chars you want to use.... with this way: First, place a tile on 0-0-0 to mark the middle of the map. After that place the stuff you want to use in the near and now use the ALT-key to grab it from this place to the final destination. Little bit faster, compared with moving every single stuff step by step inside... - You can replace complete areas btw, too. Use for this the replace-tool. (Bucket-Icon)

Placing tiles and objects in the Map Editor its not so handy like in the Voxel-Editor where we can select and move Voxel around. Move-Feature is currently not inside! - Only Select and Replace it with active object, or Delete. Keep this in mind, before you need to re-start at zero with big parts of the world! So, place it / plan it, in the first way, directly correct!

Whatever, with keep this in mind, we decide for a camera mode... I use currently the default camera, and stay in this mode. In case we change the camera-mode we have other keybindings... and thats not so good in case we want to start and to come in and remember the keys we want to use.... So, maybe its better to use first one mode and have only one keybindings first. :) And not change cam-mode and this feeling of "argh - new / other keys in use" :)

Keys that helps alot when it comes to placing:

Info: You have the right height in case you can see the placing-lines and the grid-lines... - Use some Cam-Zoom for better view on this. ;) Yes you can place Tiles in each other, maybe for landscape-creation... - But maybe, not the best idea for performance in a large scale.

(control / shift +) A & Z or mousewheel up/down
Move things up/down one Voxel or one width-value of the map.
(come in place where we place new Tiles - place things on the same height-level)

(german key-layout or QUERTZ - feels little bit wrong because A and Y and A - Z is here not in the near like the english-layout)

Right Mouse-Button
Rotate-Mode for current Tile/Object

Control / Strg
Grab the selected Height-Value, without taking Map-Object like with Alt-GR.

Alt-GR
Use it to place Tiles on the current selected height. (Replace Tile in case you want a new one, because its using the same like already placed in the map. Its pick up not only the height-value, comes with the Tile, too. - Its like the color-pick tool, when we compare this.

Control+MouseWheel up/down
Placement grid by an amount equal to the map's tile width in voxels. - Play with some walls in the Demo-Game and you become fast a feeling for this. And can directly faster come into creating-mode. :)

Use Groups
With selected Tile/Objects and pressing G we can group stuff. (include view on/off - feature)

Use Lights
With L we can add a positional light at the location of the selected tile/object/character. The light's properties can then be edited from the Map Properties panel.

General Path-Infos

Erase a path
Select a Navigation Type in the Map Editor then press RMB (Right Mouse Button) and drag between points, to remove a path. (Objects can block this feature currently. - Look next Guide-Section for details, how you can fix this.)

Info: In case you dont want to have a path... and dont want to waste time to delete this after placing in the Map-Editor... Before placing the Tile in the Map-Editor, check in the Voxel-Editor during creation-time, the option for: Passable... on/off ! - On create in the Map-Editor a path, when you place the Tile, without this option active you dont have to delete unwanted paths, later! ;) - I prefer to disable passable in Voxel Editor Settings and create path by hand, because of the Path-Glitch where we cant remove paths sometimes, without re-edit the map. Better create a path by hand.

Wall-Parts... and active passable option!

Dont use active passable-option on Wall-Tiles, it can create some path-problems.

Use the option passable (active) only on Ground-Tiles. No need to rework later Map-Parts, because of active option became in use here. Again, create path-lines in the Map Editor, only. And only on Ground-Tiles comes the active option in use! - In case you have already this problem: 1. disable active passable option in the Voxel Editor on all Wall-Tiles and re-create the map, include Ground-Tiles placed in the near, maybe include some Objects around, too... - Comes with some work. :))

[Map Editor] Cam-Positions & Path-Tool Fix
Map Editor - Camera-Positions

Cam-Positions can not only become a sense in the game... You can use this in the Map Editor as jump-points to places, where you are currently working on. No need to waste time to move the camera always in this location, again. In example, create one day the design and the next day the code-parts for this area, or place after creating the ground-design later some NPC´s to fight against, or to talk with. Simple and easy for good workflow.

Fix for the Path-Tool

Green Walk and Interact lines cant be removed often in case an object is placed inside, currently.

Workaround:

Switch the Path-Mode into: Interact Only
and change the green-pathlines into orange. After that remove the orange-lines with right mouse-button.

[Map Editor] The Map Cam Modes
Easy handling with the right Cam Mode

There are different Cam Modes in the engine that can be used inside the Map Editor. During Cam-Moving I prefer to use the F2 Selection Tool. With this we dont change a path or add things, in case we come on the mouse-button. Feels more secure, to work with.

Free Cam Mode

Today, lets take a look on the Free Cam Mode. Press the button for Free Cam mode to switch from Default Cam Mode in this one. I still play with the modes around and need the check the outer Cam Modes, but currently for me, this is the mode I like most. Fast and easy we can create the map with it.

Keys:

Keyboard: Use Arrow-Keys to move around.
Mouse: Hold Mouse-Wheel down for looking around.

With left/right arrow keys and a cam-turn with the mouse, in case we want to move forward without zooming in, we can easy hold the current height of the cam and can navigate through the map. Or use Shift + Hold Mouse-Wheel to move over the map.

[Map Editor] Switch textures of an entity-group
Switch to another model-texture defined in the Voxel Editor.

With this feature you can use the same map-parts in a different look, because of the texture-change.

Sample Code:

for $wall in group["wall_group_1"] do set_entity_texture($wall, "other_texture"); end;

Define in the Map Editor an entity group with the name: wall_group_1 (mark it, press G, give name) Now you can place the script, in example, on a button to replace the textures of the complete group.

[Map Editor] Add Entity with Behavior Settings
Behavior Settings a game-changer...

Today, new (little bit hidden), candy... :) - Lets talk about the option to add an Entity with own Behavior Settings, in example the option to spawn an enemy with active real-timecombat. First, we need to know that this is something where we need a mix of different Editors to create this:

  • Voxel-Editor (Creating Char | Setup what Behavior to use)
  • Map-Editor (Place Char and create a Behavior Setup)
  • Map Editor with Quick Script, or Script
  • Script Editor (Add Entity-Function)

1) First, lets create our char for this in the Voxel Editor.

2) After that, we place the Char inside of the Map Editor, we select the char and in the Entity Properties we watch for -> Behavior Settings. In the Preset we select Custom. Now, we can edit our settings. Lets activate the option for Attackable in Real-Time. Here, we can now edit our wanted settings, that shows up, now. - After we all have done, lets save this Behavior with a name that fits.

3) Now, back to the Voxel Editor with the open Char and select here the created Behavior from the Map Editor we just had created. Save the Char.

4) With this, we can now use the Add Entity-Function in Scripts with the settings we want. Select here the char you want to use for this, the pre-created Tile-ID in the Map Editor, where you want to spawn this Char, and the Entitiy ID. - And thats it, already.

Another way to use a Behavior in Scripts:

entity["id"].behavior = "Behavior Preset Name"

[Map Editor] Spawn & limit NPC´s on an area
You my friend walk here, here, and here.... but not there!

Spawn: Mark a tile or a group of tiles and press G, give it a name. Now you can spawn here NPC's over the map-spawn-feature. (in case you have created them in the Combat editor!)

Limit NPC's area:

With this feature you can easy define where you want to have NPC´s in your game. Comes good, in case you use a spawn-system and dont want to block the respawn, because moving chars cant enter this tile anymore and block something. In case you use a char with a light-setup and walls with light, it offers the option for a better look, because the char isnt running into the light area of the walls and come in conflict with the other lamp. It helps too, to define areas, where the player has a savespot to entering the map, use an object without getting attacked by an NPC, etc.

How to:

An easy option to bind moving NPC´s in an area, is over the group-function in the Map Editor. Mark the tiles and paths where you want to have the area with pressing G and use now a nice name. In example: NPC-Name_Area. Now, you can setup this area into the char-behavior settings.

[Script Editor] Gods program-language is math...
The Oracle: Neo, here runs alot of programs in the background...

Use print-function to check values in the ingame-console:

$charlevel = 4;
set_global_property("level", $charlevel);
print("Level: ${global.property[\"level\"]}")
or
print($charlevel)
or
$charlevel = global.property["level"];
print($charlevel)


Did you know...? - Info:

You can enter script source code directly into the in-game debug console for testing purposes, or even execute an existing script using the "exec <script_name>" syntax.

Fixed-Update Info: In case you have an old working and now buged script, that was created before the fix came out, you can fix this script just with a new save of the script. - A simple re-save can fix this. Move one Function-Window and new re-save is possible.

Sorting for Script-Names

I use currently this for a good overview/sorting of my Scripts:

Name-Samples:

i_ScriptName == Item-Script
g_ScriptName == Give Item
t_ScriptName == Script on a Tile

w_ScriptName == Script for a widget
b_ScriptName == Script on a button

m_ScriptName == Script during Map-Loading
mc_ScriptName == Script placed in Map-Loading (static cam)

o_ScriptName == Script on an Object
to_ScriptName == Script on an Object on tools binded

ge_ScriptName == Global Event Script

o_BankTerminal == Script on an Object.
t_g_HealCase == TileScript for adding a Heal Case into Players Inventory.
i_HealCase == Item-Script Code for use a Heal Case.

General Informations

Reset Zoom-Level

Just roll the mouse-wheel full power into the front, away from you until the end. Then three times/clicks back to you and you have already the default-zoom in the Script Editor.

Info: Faster Script Editor workflow with auto-connect new nodes: off.

Settings -> Script Editor Set auto-connect new nodes to off.

And we can move faster more Code-Parts in the Script Editor Window, without any connections we dont wont... and we dont need to uncut these, later! - Some time saved and for me it feels better. Try it out and decide what you prefer, here. :)

Another way for faster workflow:

Create a frame around two functions to mark them and use with right-click the duplicate-feature, to clone both functions. No need to use the menu for this.

Info: Right Mouse-Menu

Press right Mouse-Button on a Script-Part Window for more options, like: Select all, Clone current Codepart / Window, Add a Comment.


Info: Add just a Comment without Codeparts and Save the Script

This is currently a bad idea, because its buged. Removes the Script-Window and disable the Drop-Feature of Codeparts. Fix: Double Click on a Codepart and hope the Script Window comes back.


- Use sometimes a stop player & wait order. (Dialogs-Editor, too)

With this you can close still open dialogs in case you move to a new map and the char dont become stucked in the map. Maybe there is another way to close dialogs, not found out, yet. But this helps, when it comes to these problems, beside one tile free area around the char on the new map you teleported. Maybe, its a good idea, in case you runs alot of scripts in a map, too. (wait(2);)


- last code-line comes without: ; <- (last line of the script and parts of it! - look samples for more)


Info: Text-Changes in the Script Text-Window reset the placement of the Script-Windows above! We can use this for reset, or we better watch out, in case we dont want this.


Zoom in/out and create a frame for windows moving:

Mouse-Wheel: Zoom in/out
Hold Left Mouse Button: and create a frame around the windows to move them together in the right position you want them.


Change Player-Model:

One option is with map-override, the other a script with: set_entity_model(player, "charname")

[Script Editor] Char-Details / Stat Values / & Code Samples
Char stat values

The possible character stat values you can access right now are:

player.stat["currency"]

player.stat["xp"]
player.stat["level"]

player.stat["hp"]
player.stat["max_hp"]

player.stat["attack"]
player.stat["defense"]
player.stat["move_range"]

Get number of tiles a character has walked:
$num_walked = player.counter["tiles_walked"]

Check for values in an entity's model tags:
if player.tags contains "human" then
...
end

Code Samples...

Reference and modify a character's stats:
player.stat["max_hp"] += 10;
player.stat["attack"] += 2

global var + 1:
global.property["counter"] +=1

stat change:

player xp:
if player.xp > 1000 then... end

work with tags:
for tag entity["xyz"].tags do ... end

**************************************************************************

Justin wrote on Discord some samples of the new codeparts we can use, now:

Here are some examples of new things you can do in scripts now.

Use compound operators (+=, -=, *=, /=) to modify a value more easily, for example increment by a number:
self.property["counter"] += 1

Reference tile entities by coordinate:
set_entity_property(tile[0, 1, 2], "prop_name", "prop_value")

"Add Item To Container", "Remove Item From Container", "Give Item", and "Remove Item" functions now return a value indicating how many items were successfully removed/added:
items_given = give_item("ITEM_0001", 5);
if items_given < 5 then
display_message("Unable to give all items")
end

New function "Assign Entity ID" returns true or false to indicate if assignment of ID was successful:
if assign_entity_id(entity["xyz"], "new id") then
display_message("success")
end
[Script Editor] Arrays for more values
Use more values together with arrays
- more coming soon

Info: An array starts always with a zero keep this in mind. :)


Currently you can only create an array over scripts in global property and not over the engine-ui. Look sample below. With this you can use an array over local scripts in a global way! You just need to read out the global property to get the array-var.
$my_var = global.property["my_array"];


Create an empty array-var:

$my_var = array[];

An array with values inside:

$my_var = array["String_1", "String_2", "String_3"];

or with number-values instead of strings:

$my_var = array[100, 200, 300];


Write it into a global property:

global.property["my_array"] = $my_var;


Read out an array var:

$position_1 = $my_var[0]

Gives back the first entry of the array in case it's not empty.
Use [0, 1, 2 to x] instead of zero for other positions.

Read out the size of an array-var:

$my_var.size();

Gives back the amount of values inside of the array.

Clear an array-var:

$my_var.clear();

Deletes all entries inside of it. Result: $my_var = array[];


Use complete Doc-Link: (Steam cant handle it.)

More examples what you can do with arrays:

https://www.rpginabox.com/docs/doku.php?id=array

[Dialog Editor] Lets have a talk...
"I dont like to talk with the manager... - He makes the contracts..."

Linebreak for Display Message Window
Use: \n in the textfield.

Better Overview
Take a look into the left UI-Panel (tab2) for a better Dialog-Overview.

Create a player-choice:
Player choices are created by dragging a new Player node onto another existing Player Node. This will split it out into a choice branch. In case you need a third selection, just place a Player Node on Selection 2. (Below Selction 2 is wrong) ;)

Exit Dialog with options:
Just create another Dialog-Option to select with an empty node.
In example: 1. Option A || 2. Option B || 3. for exit

Add new Dialog Sections:
Add new Dialog Sections in the Main Menu of the Dialog Editor.

[UI Editor] Interface into the matrix
User Interface - the personal touch...

Default color-values:

Game Menu Arrow 00ff00
UI Editor Background 0e0c18


Theme - Button default colors:

Button Background (Normal): 0b2642
Button Border (Normal): 1a5897

Button Background (Hover): 0b2642
Button Border (Hover): 285cc4

Button Background (Pressed): 121f2a
Button Border (Pressed): 285cc4


Use Global Properties -> Interface Vars...

Easy access to all var-names of Global Properties:

- Open Game Configuration
- Go to Global Properties
- Press the below placed folder button:
-- Open Location of game.cfg
- Open the file and
- have access to all the var-names.

With this way, we can easy create a widget-load script with all the vars inside, we need.

Widget-Editor

- A text-field can be used to input a value into a var, in example for the player-name.

Auto-Update Text-Elements in Widgets without a script:
(Can eat performance? - Even in widgets they are not visible. Oo - Need more testing. Currently I use this in 4-5 widgets-elements and have -20 fps in general and only one widget is visible. Maybe, less is more, here...)

Use these example-lines directly in the text-element to auto-update text-elements in the widget, without using a script: (look player-stat what else is possible)

${global.property["CharLocation"]}
${player.stat["currency"]}


Check button-status pressed:
(script on this button / button-mode: toggle)

if $pressed then
show_widget("my_widget")
else
hide_widget("my_widget")
end


How to adress an element (/value) in a widget: (watch the diff. types)

Info: First comes the widget-id, now we adress the element, after that we edit the value.

Examples:

widget["WIDGET ID"].element["ELEMENT NUMBER ID"].text = "Hello world!";
widget["WIDGET ID"].element["ELEMENT NUMBER ID"].text = "${var}";

widget["WIDGET ID"].element["ELEMENT NUMBER ID"].image = "imagename.png";
widget["WIDGET ID"].element["ELEMENT NUMBER ID"].script = "scriptname";

widget["WIDGET ID"].element["ELEMENT NUMBER ID"].cost


Script-Examples

Make a widget element invisible: widget["widget_id"].element["0001"].visible = false;
Make a widget element visible: widget["widget_id"].element["0001"].visible = true;

$slot_item_price = widget["WIDGET ID"].element["ELEMENT NUMBER ID"].cost

Write a value in a text-label /-field:

$var = 123456; // number-value
$var = "Hello world..."; // for a string-value
$var = global.property["VarName"]; // a global property var

widget["widget_id"].element["0001"].text = "${$var}"


Write a value of a widget text-element into a var:

$var = widget["widget_id"].element["0001"].text


Count a value up in a widget-textbox:

for $id in range(0, 61) do
wait(1);
widget["pilot"].element["0028"].text = "${$id}";
print("${$id}") // can be ignored, for console!
end

Crafting

Info: Currently you need the exact item-amount of mats in the imput-fields... In case you have too much inside, crafting-process will not work, same with wrong / not enough mats inside.

Things you need for this example:

- Object, lets say a crafting-station (bind on this a script to open a widget)
- Widget for crafting interface, which comes with these elements:
4-6(+) Input Crafting Slots, 1x Item Storage Container, 1x Button, optional: progress bar
- Craftable Items & Mats in the Item Editor (watch out for only unique recepts ! - the item editor accepts currently same recepts for more then one item! - I think this can create problems for crafting-process.)

With this setup and button action craft items, you have already a complete crafting-feature in your game. In case you want to use a more complex crafting-feature, you will need a script. With this you can use the progress bar and a build-timer, beside other stuff.

[Item Editor] Items we need...
Its all about (running for) Items?!

Read out (change) the item prices
  • (as defined in the Item Editor) - in scripts: item["ITEM_0001"].cost
  • in widget shop slots (slot-price): widget["widget_id"].element["0001"].cost

Some details for Stack and Drop Limits:

It feels good for the player in case we use a nice stack and drop-system. And in case these both fits together it feels even better. In example let us use: 10 | 25 | 100 | 250 for stack-limit.

Lets say the player has now collected three items with the drop of 25 each... the next drop with 25 will add 100 into the inventory and in case this is the stack-limit it creates a nice feeling, because it fits directly. A stack-limit of 100 can be nice, because its create the nice split-feeling for: 4 drops with 25, or around 33 three times, or 1/2 of 100. It feels better then a stack-limit of lets say 353. :) Lets look on drop-amount, four drops with 5 items per drop gives you a nice and easy feeling to calc your drops and designe your loot-system and it fits again with stack-limit of 25 and thats 1/4 of 100. With other words, we see it gives a good overview, for the player and to calc/balance the game-system for the designer.

General Details:

- Item Sorting based on A-Z of Item-Name. (not item-id)
- To bind a Script on an Item, this need to be consumable.
- Unlimited Use and Stack-Option is binded.
- Consumable Items become removed from inventory by use by default.
(double remove in case you remove the item in script, too)
- Item Tags comes in use in the Equipment-System

A-Z Re-Sorting of Item Editor

Do these steps:

After adding new items, save.
Press now on: Exit to Game Manager
Reload the project.
And Item Editor shows the items in A-Z order, again.

Little Gimp-Guide:
https://steamcommunity.com/sharedfiles/filedetails/?id=2161248181
[Combat Editor] soon
coming soon

[NPC Range Combat]
Sample of Range Combat feature for NPC's:

Basic-Details:

It works in general like the player Range Combat-feature. A main difference is here the npc's get equiped over script because they have/need no equip-UI for that. But they have an inventory (hidden) and they must be equiped with the weapon over script. In general it looks like this:
  • 1. Spawn NPC, give entity-id.
  • 2. Give behaviour with attack in real time option active.
  • 3. Give defined range combat weapon - Item Editor: ammo unlimited option & tag: weapon.
  • 4. Equip this weapon on the npc.
The npc attack-animation need now one frame (is enough!) with: two attach points, one with: right_hand the other with projectile. Both models have the same attach point names inside of the model you define in the range combat item for npc's in the Item Editor. (weapon + projectile-model)

You can use for the weapon an empty model with just the attach point right_hand inside. The projectile-model comes with attach point name: projectile.

Code-Sample:
(already with point 1-2 in use, look above!)

if entity["rc_npc_01"].inventory contains "ITEM_0001" then
else
give_item("ITEM_0001", 1, entity["rc_npc_01"]);
equip_item(entity["rc_npc_01"], "right_hand", "ITEM_0001");
end;

[Stat Editor] Leveling & Currency
Lets Create a Level- and Currency-System (WIP)

Leveling

Here you can create how much Char-Level will be created in the game. The good thing is, you have for the next Level already the required Skillpoints added. In example: You need 100 Skillpoints for next Level 2 and add Level 3 to the list, you have already a plus of 100... This works for other values, too. In example: Level 2 need 1025 Skillpoints and Level 3 comes already with: 2050 Skillpoints. (from start) No need to change here something, in case you want always the same value for the next Level Up. :)

Save-Values: Click into another value-box, before you go to another Level-Item in the list...!

Info:

- Max value of Increases per Level: 100 (Health / Defensive / Attack)
- For Defensive or Attack make small values already a massive difference! - i.e. 2-5 points...
- Start-Values can be edited in the Voxel-Editor of your selected Player-Char
- You can see ingame a little info, when it was time for Level Up.

Create Levels faster:

Check stats.json in the project-folder for more infos and how you can create Levels faster. No need to create this in the engine for 20 Levels. (include 3 edits per Level) Just create 2-3 Levels and copy/paste the rest inside stats.json. Faster, in case you just need to edit the xp-value.


Currency

Info: The Currency-System isnt 100% inside, yet.

The current options are:

- Over Script: player.stat["currency"] += 100

This line adds 100 into the player bank-account. Maybe, its already possible to add / use this over a widget-ui, in example show in a textfield the current bank-value and add this over a button for testing.

- The new widget-update comes with an item-value and a shop-slot.

Other options, beside the coming default-system:

- Use a currency-item in combination with amount-check for trading.
- Use an own var for a personal bank-system.

[Documentation] Justin-Guide can help you :)
This is rly a sweet feature... :)

In case you need help with some part of the engine... Look top right under the Windows-Close Button. There you can find a little Justin-Guide-Icon, you can move this on parts of the engine to open the nice in-engine Documentation for the part where the char got dropped. - This is big cinema... :) - I love it. :)
[Tools & Co] Other helpful things
Tools to edit exported game.exe icon / file-details
https://steamcommunity.com/sharedfiles/filedetails/?id=2974324548

Time for a backup, NOW! :)
They are (more or less) two types of person out there:

[A.] Make a backup... / have a backup! (better be [A.]) :)
[B.] Want to make a backup... (Diablo II was btw [B.]) ;)
[C.] You hear a voice out of the cave: "Höhhh?!"...

https://www.easeus.de/backup-software/
https://www.ubackup.com/

Organize your game design / project & Home Office
XMind - Mind Mapping Software - https://www.xmind.net/

Project & Team Management Webtool - https://www.trello.com

Team Communication & Home Office over Discord - https://discord.com

Create fast & easy a website with Blogger - https://www.blogger.com/

Nice webtool to make things round:
https://donatstudios.com/PixelCircleGenerator

In case you need a round ball and not only a flat model, just use the add voxel tool with face option and add another layer. Look that you have before created the frame in another color. With this, you can realy create fast round things. Reduce the next layer again with a frame in another color... and fast you have create a ball, or a round thing, whatever you need in a round 3D voxel-design. Or you use other voxel-tools to create this.