Hello
A bug that doesn't take up but the number instead
[inputs.up]
name = "up"
repeat = true
bind = ["1", "w"]
1 = up
2 = right
3 = bottom
4 = left
Is it possible to set a maximum limit on the number of items that can be collected? For instance, 99 potions and if more are obtained, the counter wouldn't increase.
That's a good question, and we could consider adding this method to the engine.
For the moment, it's possible to find out all the player's items withplayer.items
And a condition like
if (player.items.length > 99) {
}
is used to check.
player.items is not documented because it is not currently planned to use the property, but it is not private either.
From the documentation, I have also seen that it is NOT possible to add additional metadata to objects in the Database. For example, it would be very useful for me to have a generic object like meta: {}, which I can populate with any value or object that I deem necessary.
You can just use a property in the class:
import { Item } from '@rpgjs/database'
@Item({
})
export class Potion {
otherParam = 'value'
}
I didn't understand how theme.scss works and the customization of plugins. I would like to align the UI of the login screen of the Title Screen plugin, without manually modifying the package inside the node_modules folder. Similarly, for the chat, I would like to be able to move it around on the screen as I wish (I can easily do it by modifying the package), only changing the code in my project.
Create atheme.scss
file at the root of your project and override CSS variables.
You can also retrieve the plugin from https://github.com/RSamaium/RPG-JS/tree/v4/packages/plugins and add it to your project. Remember to include the path in the rpg.toml modules.
But with solution, you can't take advantage of the plugins patches